# `MishkaGervaz.Table.Types.Column`
[🔗](https://github.com/mishka-group/mishka_gervaz/blob/v0.0.1-alpha.3/lib/mishka_gervaz/table/types/column.ex#L1)

Built-in column type registry.

Provides lookup for built-in column types by atom name.
Custom column types can be used directly by passing the module.

## Built-in Types

- `:text` - Plain text (default)
- `:boolean` - Boolean with checkmark/X icons
- `:number` - Numeric values
- `:date` - Date formatting
- `:datetime` - DateTime formatting
- `:uuid` - UUID with truncation
- `:array` - Array/list values
- `:badge` - Status badges with colors
- `:link` - Clickable links

## Usage in DSL

    columns do
      column :name                          # Auto-detects type
      column :status, type: :badge          # Built-in type
      column :color, type: MyApp.ColorType  # Custom type
    end

See `MishkaGervaz.Table.Behaviours.TypeRegistry` (base),
`MishkaGervaz.Table.Behaviours.ColumnType`, and
`MishkaGervaz.Table.Entities.Column`.

# `builtin?`

```elixir
@spec builtin?(atom()) :: boolean()
```

Check if type name is registered.

# `builtin_types`

```elixir
@spec builtin_types() :: [atom()]
```

List all built-in type names.

# `default`

```elixir
@spec default() :: module() | nil
```

Get the default type module.

# `get`

```elixir
@spec get(atom()) :: module() | nil
```

Get module by type name.

Returns the module for built-in types, or the type itself
if it's already a module (for custom types).

# `get_or_passthrough`

```elixir
@spec get_or_passthrough(atom()) :: module()
```

Get module, falling back to type itself for custom modules.

Unlike `get/1` which returns nil for unknown types,
this returns the type as-is (assuming it's a custom module).

# `infer_from_ash_type`

```elixir
@spec infer_from_ash_type(map() | nil) :: module()
```

Infer column type module from Ash attribute type.

Maps Ash types to appropriate column type modules for rendering.
Returns default type when attribute is nil or type is unknown.

Auto-generated from builtin type registry mappings.

# `resolve_type`

```elixir
@spec resolve_type(map(), map()) :: module()
```

Resolve column type module from explicit type or Ash attribute.

Checks in order:
1. If type_module is already set (from DSL transform), use it
2. If ui.type is set and is a module with `render/4`, use it directly
3. If ui.type is set and is an atom, look up in built-in registry
4. Otherwise, infer from Ash attribute type

## Examples

    iex> MishkaGervaz.Table.Types.Column.resolve_type(%{ui: %{type: :badge}}, %{})
    MishkaGervaz.Table.Types.Column.Badge

    iex> MishkaGervaz.Table.Types.Column.resolve_type(%{name: :active}, %{active: %{type: Ash.Type.Boolean}})
    MishkaGervaz.Table.Types.Column.Boolean

---

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