# `Jido.Chat.Modal`
[🔗](https://github.com/agentjido/jido_chat/blob/v1.2.0/lib/jido/chat/modal.ex#L1)

Canonical modal open payload and builder helpers.

# `t`

```elixir
@type t() :: %Jido.Chat.Modal{
  callback_id: nil | nil | binary(),
  close_label: binary(),
  elements: [any()],
  id: nil | nil | binary(),
  metadata: map(),
  notify_on_close: boolean(),
  private_metadata: nil | nil | binary(),
  submit_label: binary(),
  title: binary()
}
```

# `date_input`

```elixir
@spec date_input(String.t(), String.t(), keyword() | map()) ::
  Jido.Chat.Modal.Element.t()
```

Builds a date input element.

# `dynamic_select`

```elixir
@spec dynamic_select(String.t(), String.t(), keyword() | map()) ::
  Jido.Chat.Modal.Element.t()
```

Builds a dynamic select. This is an alias for `external_select/3`.

# `external_select`

```elixir
@spec external_select(String.t(), String.t(), keyword() | map()) ::
  Jido.Chat.Modal.Element.t()
```

Builds a select whose options load from an external source.

# `fallback_text`

```elixir
@spec fallback_text(t()) :: String.t()
```

Returns deterministic accessible text for a modal.

# `from_map`

```elixir
@spec from_map(map()) :: t()
```

Builds a modal from serialized map data.

# `new`

```elixir
@spec new(t() | map()) :: t()
```

Creates a canonical modal.

# `number_input`

```elixir
@spec number_input(String.t(), String.t(), keyword() | map()) ::
  Jido.Chat.Modal.Element.t()
```

Builds a number input element.

# `radio_select`

```elixir
@spec radio_select(
  String.t(),
  String.t(),
  [Jido.Chat.Modal.Element.t() | map()],
  keyword() | map()
) ::
  Jido.Chat.Modal.Element.t()
```

Builds a radio select element.

# `schema`

Returns the schema for modals.

# `select`

```elixir
@spec select(
  String.t(),
  String.t(),
  [Jido.Chat.Modal.Element.t() | map()],
  keyword() | map()
) ::
  Jido.Chat.Modal.Element.t()
```

Builds a select element.

# `select_option`

```elixir
@spec select_option(String.t(), String.t(), keyword() | map()) ::
  Jido.Chat.Modal.Element.t()
```

Builds a select option element.

# `select_option_group`

```elixir
@spec select_option_group(
  String.t(),
  [Jido.Chat.Modal.Element.t() | map()],
  keyword() | map()
) ::
  Jido.Chat.Modal.Element.t()
```

Builds a select option group element.

# `text_input`

```elixir
@spec text_input(String.t(), String.t(), keyword() | map()) ::
  Jido.Chat.Modal.Element.t()
```

Builds a text input element.

# `to_adapter_payload`

```elixir
@spec to_adapter_payload(t()) :: map()
```

Returns a plain map suitable for adapter-specific modal rendering.

# `to_map`

```elixir
@spec to_map(t()) :: map()
```

Serializes the modal into a plain map with a type marker.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
