[{"name":"Curtissimo.NativeModalDialog","comment":" This module provides the Elm bindings to render\nand work with a native HTML 5 <dialog> element.\n\nIt uses the custom `elm-dialog-proxy` Web component to\nbridge between setting attributes and properties to the\nnative dialog.\n\n    import Curtissimo.NativeDialog as Dialog\n\n    view : Model -> Browser.Document Msg\n    view model =\n        let\n            dialogOptions =\n                Dialog.init { id = \"my-dialog\" }\n                    |> Dialog.showDialog model.showDialog\n                    |> Dialog.withCancelHandler\n                        (Dialog.allowDefault DialogCanceled)\n                    |> Dialog.withClassList\n                        [ ( \"dialog\", True ) ]\n                    |> Dialog.withCloseHandler DialogClosed\n        in\n        Html.main_ []\n            [ Dialog.view dialogOptions\n                [ Html.form\n                    [ Html.Events.onSubmit HideDialog ]\n                    [ Html.div []\n                        [ Html.header []\n                            [ Html.p [] [ Html.text \"My Dialog\" ] ]\n                        , Html.section []\n                            [ Html.p []\n                                [ Html.text \"This is a <dialog> element!\" ]\n                            , Html.p []\n                                [ Html.text \"You can hit the \"\n                                , Html.kbd [] [ Html.text \"Esc\" ]\n                                , Html.text \" key to cancel it\"\n                                ]\n                            ]\n                        , Html.div [}\n                            [ Html.div []\n                                [ Html.button []\n                                    [ Html.text \"Submit\" ]\n                                , Html.button\n                                    [ Attrs.attribute \"formmethod\" \"dialog\"]\n                                    [ Html.text \"Close\" ]\n                                ]\n                            ]\n                        ]\n                    ]\n                ]\n            ]\n\n\n## Configuring\n\n@docs init, showDialog, withCancelHandler, withClassList, withCloseHandler\n\n\n## Rendering\n\n@docs view\n\n\n## Options\n\n@docs DialogCancelHandler, allowDefault\n\n\n## Opaque types\n\n@docs DialogState\n\n","unions":[{"name":"DialogState","comment":" The state needed by the native dialog to properly render.\n","args":["msg"],"cases":[]}],"aliases":[{"name":"DialogCancelHandler","comment":" Specify the `msg` and a flag to indicate if the\ncancel event should be prevented from occurring.\n\n  - `message` is the value you want to pass to the page's\n    `update` function.\n  - `preventDefault` will prevent the dialog from closing\n    if set to `True`.\n\n","args":["msg"],"type":"{ message : msg, preventDefault : Basics.Bool }"}],"values":[{"name":"allowDefault","comment":" If you never will prevent the default behavior of the **cancel** event\nof the dialog, you can use this convenience function.\n","type":"msg -> Json.Decode.Decoder (Curtissimo.NativeModalDialog.DialogCancelHandler msg)"},{"name":"init","comment":" Initialize the dialog state with the HTML id to use for the dialog.\n","type":"{ id : String.String } -> Curtissimo.NativeModalDialog.DialogState msg"},{"name":"showDialog","comment":" Set the flag in the dialog state to show or hide the dialog.\n","type":"Basics.Bool -> Curtissimo.NativeModalDialog.DialogState msg -> Curtissimo.NativeModalDialog.DialogState msg"},{"name":"view","comment":" Render the <dialog> element and the proxy handler needed to control the\ndialog.\n\n**Note**: Make sure you have included the `elm-dialog-proxy.js` in your page\nor as part of your build.\n\n","type":"Curtissimo.NativeModalDialog.DialogState msg -> List.List (Html.Html msg) -> Html.Html msg"},{"name":"withCancelHandler","comment":" Set the `Json.Decode.Decoder` to use when the dialog is canceled\nwith the `Esc` key. This provides you a way to stop propagation on the\nevent.\n\n**Note**: This only fires when the dialog is dismissed using the `Esc` key\n\n","type":"Json.Decode.Decoder (Curtissimo.NativeModalDialog.DialogCancelHandler msg) -> Curtissimo.NativeModalDialog.DialogState msg -> Curtissimo.NativeModalDialog.DialogState msg"},{"name":"withClassList","comment":" Set the class list that will be applied to the <dialog> element.\n","type":"List.List ( String.String, Basics.Bool ) -> Curtissimo.NativeModalDialog.DialogState msg -> Curtissimo.NativeModalDialog.DialogState msg"},{"name":"withCloseHandler","comment":" Set the message you want to have fired when the dialog is closed.\n","type":"msg -> Curtissimo.NativeModalDialog.DialogState msg -> Curtissimo.NativeModalDialog.DialogState msg"}],"binops":[]}]