# `A2UICore.Resolution.Binder`
[🔗](https://github.com/a2ui-elixir/a2ui/blob/v0.1.1/umbrella/apps/a2ui_core/lib/a2ui_core/resolution/binder.ex#L1)

Resolves a component's properties to the values a renderer displays.

The component's catalog schema says how each property behaves:

  * *dynamic* (`DynamicString`, `DataBinding`, … — anything that may be
    a binding or a function call) — evaluated against the data model;
  * *action* — kept as the raw action object, to be resolved with
    `A2UICore.Resolution.DataContext.resolve_action/2` when triggered;
  * *structural* (`ChildList`, `ComponentId`, templates) — kept as is,
    for the node resolver to expand;
  * *checkable* — the rule list is kept and the owning object gains
    `"isValid"`, `"validationErrors"` and `"validationResult"`;
  * objects and arrays are resolved member by member.

Where the schema says nothing (a component whose schema is an `allOf`
envelope, an unknown component, a property the schema does not
declare) the behavior is inferred from the value's shape, as the
reference binder does.

The result is a snapshot: `bind/4` is pure and returns the resolved
properties together with the warnings and errors raised while
evaluating them (`t:A2UICore.Resolution.DataContext.effect/0`).
Reactive updates are the host's job — it rebinds when the data model or
the component changes.

# `behavior`
*since 0.1.0* 

```elixir
@type behavior() ::
  :dynamic
  | :action
  | :structural
  | :checkable
  | :static
  | {:object, %{optional(String.t()) =&gt; behavior()}}
  | {:array, behavior()}
```

How a property behaves at runtime.

# `bind`
*since 0.1.0* 

```elixir
@spec bind(
  A2UICore.Resolution.DataContext.t(),
  A2UICore.State.Component.t(),
  A2UICore.Catalog.t() | nil,
  keyword()
) :: {map(), [A2UICore.Resolution.DataContext.effect()]}
```

Resolves `component`'s properties in `context`.

`catalog` supplies the component's schema (`nil` or a catalog without
the component falls back to shape inference). Option `:schema`
overrides the component schema.

With `wrap: true` every dynamic position comes back as an
`A2UICore.Resolution.Binding` (writable when it was bound to a path,
read-only for a literal or a call, and a read-only `nil` binding when
the component omitted it) and every action as an
`A2UICore.Resolution.Action`, instead of bare values. The positions are
those the schema declares, `allOf` envelopes included.

# `classify`
*since 0.1.0* 

```elixir
@spec classify(term(), map()) :: behavior()
```

The behavior of a schema: `:dynamic`, `:action`, `:structural`,
`:checkable`, `:static`, `{:object, shape}` or `{:array, element}`.

`defs` are the definitions its `$ref`s resolve against.

---

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