[{"name":"Autocomplete","comment":" Autocomplete contains the main logic to handle auto-complete.\nThe state and logic of Autocomplete should reside within your model.\nPlease refer to our examples to see how it all linked up.\n\nTo render the Autocomplete, please refer to `Autocomplete.View` or `Autocomplete.Styled`.\n\n\n# Types\n\n@docs Autocomplete, ViewState, ViewStatus, Choices, Msg\n\n\n# State Management\n\n@docs init, update\n\n\n# Helpers\n\n@docs reset, selectedValue\n\n\n# Accessors\n\n@docs viewState, query, choices, selectedIndex, isSelected\n\n","unions":[{"name":"Autocomplete","comment":" The opaque type of Autocomplete\n","args":["a"],"cases":[]},{"name":"ViewStatus","comment":" A useful union type for rendering the correct view for each state of Autocomplete\n","args":[],"cases":[["NotFetched",[]],["Fetching",[]],["Error",["String.String"]],["FetchedChoices",[]]]}],"aliases":[{"name":"Choices","comment":" Record to hold the query and choices for fetching and displaying\n","args":["a"],"type":"Internal.Choices a"},{"name":"Msg","comment":" Opaque type of Autocomplete internal msg\n","args":["a"],"type":"Internal.Msg a"},{"name":"ViewState","comment":" Record to expose common values of Autocomplete to be used for display\n","args":["a"],"type":"{ query : String.String, choices : List.List a, ignoreList : List.List a, selectedIndex : Maybe.Maybe Basics.Int, status : Autocomplete.ViewStatus }"}],"values":[{"name":"choices","comment":" Returns the current list of choices\n","type":"Autocomplete.Autocomplete a -> List.List a"},{"name":"init","comment":" Initialize the Autocomplete\n","type":"Autocomplete.Choices a -> (Autocomplete.Choices a -> Task.Task String.String (Autocomplete.Choices a)) -> Autocomplete.Autocomplete a"},{"name":"isSelected","comment":" Helper function to calculate if an index is selected\n","type":"Maybe.Maybe Basics.Int -> Basics.Int -> Basics.Bool"},{"name":"query","comment":" Returns the query of the Autocomplete\n","type":"Autocomplete.Autocomplete a -> String.String"},{"name":"reset","comment":" Reset the Autocomplete State\n","type":"Autocomplete.Choices a -> Autocomplete.Autocomplete a -> Autocomplete.Autocomplete a"},{"name":"selectedIndex","comment":" Returns the selected index of the Autocomplete\n","type":"Autocomplete.Autocomplete a -> Maybe.Maybe Basics.Int"},{"name":"selectedValue","comment":" Returns the selectedValue\n","type":"Autocomplete.Autocomplete a -> Maybe.Maybe a"},{"name":"update","comment":" Update the Autocomplete state\n","type":"Autocomplete.Msg a -> Autocomplete.Autocomplete a -> ( Autocomplete.Autocomplete a, Platform.Cmd.Cmd (Autocomplete.Msg a) )"},{"name":"viewState","comment":" Returns the ViewState of the Autocomplete\n","type":"Autocomplete.Autocomplete a -> Autocomplete.ViewState a"}],"binops":[]},{"name":"Autocomplete.Styled","comment":" Autocomplete.Styled exposes [HTML.Styled](https://package.elm-lang.org/packages/rtfeldman/elm-css/latest/Css) events to be attached for input and every autocomplete choice.\n\n\n# Type\n\n@docs Events, EventMapper\n\n\n# Attributes\n\n@docs events\n\n","unions":[],"aliases":[{"name":"EventMapper","comment":" Map Autocomplete Msg into your app's msg and also the msg to send when user selects a choice\n","args":["a","msg"],"type":"{ onSelect : msg, mapHtml : Internal.Msg a -> msg }"},{"name":"Events","comment":" Record to hold the events to be attached for input and every autocomplete choice\n","args":["msg"],"type":"{ inputEvents : List.List (Html.Styled.Attribute msg), choiceEvents : Basics.Int -> List.List (Html.Styled.Attribute msg) }"}],"values":[{"name":"events","comment":" Returns the events to be attached for input and every autocomplete choice\n","type":"Autocomplete.Styled.EventMapper a msg -> Autocomplete.Styled.Events msg"}],"binops":[]},{"name":"Autocomplete.View","comment":" Autocomplete.View exposes HTML events to be attached for input and every autocomplete choice.\n\n\n# Type\n\n@docs Events, EventMapper\n\n\n# Attributes\n\n@docs events\n\n","unions":[],"aliases":[{"name":"EventMapper","comment":" Map Autocomplete Msg into your app's msg and also the msg to send when user selects a choice\n","args":["a","msg"],"type":"{ onSelect : msg, mapHtml : Internal.Msg a -> msg }"},{"name":"Events","comment":" Record to hold the events to be attached for input and every autocomplete choice\n","args":["msg"],"type":"{ inputEvents : List.List (Html.Attribute msg), choiceEvents : Basics.Int -> List.List (Html.Attribute msg) }"}],"values":[{"name":"events","comment":" Returns the events to be attached for input and every autocomplete choice\n","type":"Autocomplete.View.EventMapper a msg -> Autocomplete.View.Events msg"}],"binops":[]}]