[{"name":"HtmlHelpers","comment":" Helper functions for conditionally rendering HTML elements.\n\nThese utilities make it easier to work with [`Html`](http://package.elm-lang.org/packages/elm-lang/html/latest/Html#Html)\nin a more declarative way.\n\n@docs contentList, lazyContentList, maybeContentList, when, unless, lazyWhen, lazyUnless, maybeNode, resultNode, successNode, errNode, attributeIf, attributesIf, noAttribute, wrapToSingleNode, nothing, hideOnBreakpoint\n\n","unions":[],"aliases":[],"values":[{"name":"attributeIf","comment":" Conditionally include a single attribute.\n\nReturns the given attribute when the condition is `True`, otherwise returns `noAttribute`.\n\nExample:\n\n    Html.button [ attributeIf model.disabled (Attributes.disabled True) ]\n        [ Html.text \"Submit\" ]\n\n","type":"Basics.Bool -> Html.Attribute msg -> Html.Attribute msg"},{"name":"attributesIf","comment":" Conditionally include a list of attributes.\n\nReturns the given attributes when the condition is `True`, otherwise returns an empty list.\n\nExample:\n\n    Html.div\n        (attributesIf model.isPrimary\n            [ Attributes.class \"btn\"\n            , Attributes.class \"btn-primary\"\n            ]\n        )\n        [ Html.text \"Click\" ]\n\n","type":"Basics.Bool -> List.List (Html.Attribute msg) -> List.List (Html.Attribute msg)"},{"name":"contentList","comment":" Conditionally render HTML nodes based on boolean flags.\n\nThis function is conceptually similar to `Attributes.classList`, but for\ncontent nodes rather than CSS classes. Each entry in the list will be included\nin the output only if its associated boolean value is `True`.\n\nFor example:\n\n    viewAnimals : Animal -> Animal -> Animal -> Html msg\n    viewAnimals dog cat mouse =\n        Html.section [ Attributes.id \"animals\" ] <|\n            contentList\n                [ ( Html.text dog.name, dog.visible ) -- included only if dog.visible is True\n                , ( Html.text cat.name, cat.visible ) -- included only if cat.visible is True\n                , ( Html.text mouse.name, mouse.visible ) -- included only if mouse.visible is True\n                ]\n\n","type":"List.List ( Html.Html msg, Basics.Bool ) -> List.List (Html.Html msg)"},{"name":"errNode","comment":" Render HTML for the error case of a Result.\n\nThis is a convenience function that only renders the error case of a Result,\nreturning an empty text node for the success case.\n\nExample:\n\n    viewError : Result String User -> Html msg\n    viewError result =\n        errNode viewErrorMessage result\n\n","type":"(e -> Html.Html msg) -> Result.Result e a -> Html.Html msg"},{"name":"hideOnBreakpoint","comment":" A clever (albeit hacky) helper to hide content (using max-width and max-height 0) below a given breakPoint.\n\nSimply pipe your content like this: `|> hideOnBreakpoint \"600px\"` (or even `|> hideOnBreakpoint \"100vh\"`, to hide when width < height)\n\n","type":"String.String -> Html.Html msg -> Html.Html msg"},{"name":"lazyContentList","comment":" A lazy version of `contentList` for performance optimization.\n\nThis function takes a list of thunks (functions that take unit `()` and return HTML)\npaired with boolean values. The thunks are evaluated only when their corresponding\nboolean is `True`, making this function more efficient when the HTML generation is\nexpensive but condition evaluation is cheap.\n\nExample:\n\n    viewAnimals : List Animal -> Html msg\n    viewAnimals animals =\n        Html.section [ Attributes.id \"animals\" ] <|\n            lazyContentList\n                [ ( \\_ -> expensiveRenderFunction animal1, animal1.visible )\n                , ( \\_ -> expensiveRenderFunction animal2, animal2.visible )\n                , ( \\_ -> expensiveRenderFunction animal3, animal3.visible )\n                ]\n\n","type":"List.List ( () -> Html.Html msg, Basics.Bool ) -> List.List (Html.Html msg)"},{"name":"lazyUnless","comment":" Lazily render a single HTML node when the condition is `False`.\n\nThis is the inverse of `lazyWhen`.\n\nExample:\n\n    view : Model -> Html msg\n    view model =\n        Html.section [ Attributes.id \"offline\" ]\n            [ lazyUnless model.isOnline (\\_ -> expensiveOfflineBanner model) ]\n\n","type":"Basics.Bool -> (() -> Html.Html msg) -> Html.Html msg"},{"name":"lazyWhen","comment":" Lazily render a single HTML node.\n\nTakes a thunk `() -> Html msg` and evaluates it only when the condition is `True`.\n\nExample:\n\n    view : Model -> Html msg\n    view model =\n        Html.section [ Attributes.id \"notice\" ]\n            [ lazyWhen model.showNotice (\\_ -> expensiveNoticeView model) ]\n\n","type":"Basics.Bool -> (() -> Html.Html msg) -> Html.Html msg"},{"name":"maybeContentList","comment":" Conditionally render HTML nodes based on `Maybe` values.\n\nThis function is similar to `lazyContentList` but works with `Maybe` values instead of\nbooleans. HTML nodes will only be rendered for items that have a `Just` value.\nWhen the value is `Nothing`, the node is omitted from the output.\n\nExample:\n\n    view =\n        maybeContentList\n            [ ( \\text -> Html.text text, Just \"This will be rendered\" )\n            , ( \\text -> Html.text text, Nothing ) -- This will be omitted\n            , ( \\user -> viewUser user, maybeUser ) -- Rendered only if maybeUser is Just\n            ]\n\n","type":"List.List ( a -> Html.Html msg, Maybe.Maybe a ) -> List.List (Html.Html msg)"},{"name":"maybeNode","comment":" Render HTML based on a Maybe value.\n\nThis function takes a view function and a Maybe value. If the value is `Just`, it renders\nthe value using the provided view function. If the value is `Nothing`, it returns an empty\ntext node.\n\nExample:\n\n    viewUser : Maybe User -> Html msg\n    viewUser maybeUser =\n        maybeNode viewUserDetails maybeUser\n\n","type":"(a -> Html.Html msg) -> Maybe.Maybe a -> Html.Html msg"},{"name":"noAttribute","comment":" A no-op attribute.\n\nThis is effectively an empty `class` attribute. Useful as a placeholder when\nyou need to return a single attribute but want it to be a no-op.\n\nExample:\n\n    Html.div [ noAttribute ] []\n\n","type":"Html.Attribute msg"},{"name":"nothing","comment":" A concise way to render nothing.\n\nThis is a convenience function that provides the idiomatic approach for rendering\nnothing in Elm: an empty text node. Use this instead of `Html.text \"\"` for improved\nreadability and consistency.\n\n","type":"Html.Html msg"},{"name":"resultNode","comment":" Render HTML based on a Result value.\n\nThis function takes two view functions - one for the error case and one for the success case -\nand a Result value. It renders either the error or success view depending on the Result.\n\nExample:\n\n    viewUserData : Result String User -> Html msg\n    viewUserData result =\n        resultNode viewError viewUser result\n\n","type":"(e -> Html.Html msg) -> (a -> Html.Html msg) -> Result.Result e a -> Html.Html msg"},{"name":"successNode","comment":" Render HTML for the success case of a Result.\n\nThis is a convenience function that only renders the success case of a Result,\nreturning an empty text node for the error case.\n\nExample:\n\n    viewUserData : Result String User -> Html msg\n    viewUserData result =\n        successNode viewUser result\n\n","type":"(a -> Html.Html msg) -> Result.Result e a -> Html.Html msg"},{"name":"unless","comment":" Render a single HTML node when the condition is `False`.\n\nThis is the inverse of `when`.\n\nExample:\n\n    view : Model -> Html msg\n    view model =\n        Html.section [ Attributes.id \"offline\" ]\n            [ unless model.isOnline (Html.text \"You are offline\") ]\n\n","type":"Basics.Bool -> Html.Html msg -> Html.Html msg"},{"name":"when","comment":" Conditionally render a single HTML node.\n\nIf the condition is `True`, returns the provided node; otherwise returns `nothing`.\n\nExample:\n\n    view : Model -> Html msg\n    view model =\n        Html.section [ Attributes.id \"notice\" ]\n            [ when model.showNotice (Html.text \"Important notice\") ]\n\n","type":"Basics.Bool -> Html.Html msg -> Html.Html msg"},{"name":"wrapToSingleNode","comment":" Convert a list of HTML nodes into a single node, following these rules:\n\n1.  If the list is empty, return `nothing` (an empty text node)\n2.  If the list contains exactly one element, return that element unchanged\n3.  If the list contains multiple elements, wrap them with a `div` using `display: contents`\n\nUsing `display: contents` makes the wrapper transparent in the DOM layout,\nallowing children to participate in the parent's layout as if they were direct children.\n\nMore about `display: contents`: <https://developer.mozilla.org/en-US/docs/Web/CSS/display#contents>\n\n","type":"List.List (Html.Html msg) -> Html.Html msg"}],"binops":[]}]