# `MishkaGervaz.Table.Entities.Notice`
[🔗](https://github.com/mishka-group/mishka_gervaz/blob/v0.0.1-alpha.3/lib/mishka_gervaz/table/entities/notice.ex#L1)

Entity struct for static table notices (alerts/banners).

Mirrors `MishkaGervaz.Form.Entities.Notice` but with table-specific
positions and bind_to atoms.

## Positions

Atoms:
- `:table_top` - above everything in the table region
- `:before_header` / `:after_header` - around the table header
- `:before_filters` / `:after_filters` - around the filters bar
- `:before_bulk_actions` / `:after_bulk_actions` - around the bulk action bar
- `:before_table` / `:after_table` - around the `<table>` element itself
- `:before_pagination` / `:after_pagination` - around the pagination row
- `:table_bottom` - last possible slot inside the table region
- `:empty_state` - rendered only when the stream is empty

Tuples:
- `{:before_column, :col_name}` / `{:after_column, :col_name}` -
  decorate a specific column header cell

## Bind to (dynamic activation)

- `:no_results` - active when the stream is empty after a load
- `:has_filters` - active when any filter has a non-empty value
- `:has_selection` - active when any row is selected
- `:loading` - active when the table is in `:loading` state
- `:error` - active when the load returned an error
- `:archived_view` - active when viewing archived records
- `nil` - no auto-binding; controlled solely by `visible`/`show_when`

## Example

    layout do
      notice :archived_warning do
        position :before_table
        type :warning
        icon "hero-archive-box"
        title "Viewing archived records"
        bind_to :archived_view
      end

      notice :no_match do
        position :empty_state
        type :info
        title "No records match your filters"
        bind_to :no_results
      end
    end

See `MishkaGervaz.Table.Dsl.Layout`,
`MishkaGervaz.Table.Entities.Notice.Ui`,
`MishkaGervaz.Table.Entities.Header` /
`MishkaGervaz.Table.Entities.Footer` (sibling chrome), and the form-side
counterpart `MishkaGervaz.Form.Entities.Notice`.

# `position`

```elixir
@type position() ::
  :table_top
  | :before_header
  | :after_header
  | :before_filters
  | :after_filters
  | :before_bulk_actions
  | :after_bulk_actions
  | :before_table
  | :after_table
  | :before_pagination
  | :after_pagination
  | :table_bottom
  | :empty_state
  | {:before_column, atom()}
  | {:after_column, atom()}
```

# `t`

```elixir
@type t() :: %MishkaGervaz.Table.Entities.Notice{
  __identifier__: atom() | nil,
  __spark_metadata__: map() | nil,
  bind_to:
    :no_results
    | :has_filters
    | :has_selection
    | :loading
    | :error
    | :archived_view
    | nil,
  content: String.t() | (-&gt; String.t()) | (map() -&gt; String.t()) | nil,
  dismissible: boolean(),
  icon: String.t() | nil,
  name: atom(),
  position: position(),
  render:
    (map() -&gt; Phoenix.LiveView.Rendered.t())
    | (map(), map() -&gt; Phoenix.LiveView.Rendered.t())
    | nil,
  restricted: boolean() | (map() -&gt; boolean()),
  show_when: (map() -&gt; boolean()) | nil,
  title: String.t() | (-&gt; String.t()) | (map() -&gt; String.t()) | nil,
  type: :info | :warning | :error | :success | :neutral,
  ui: MishkaGervaz.Table.Entities.Notice.Ui.t() | nil,
  visible: boolean() | (map() -&gt; boolean())
}
```

# `transform`

# `validate_position`

Validate a position value. Returns `:ok` or `{:error, reason}`.

---

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