<!-- source-hash: c483f7e7ed16ddf489c0f0b85c84e31b -->
A fully-featured autocomplete/combobox input component supporting both single and multi-select modes, with keyboard navigation, tag display, filtering, and creatable options.

## Key Components

### Types & Interfaces
- **`AutocompleteOption<T>`** — Shape of each selectable option (`label` + `value`)
- **`AutocompleteInputChangeReason`** — Union of `'input' | 'reset' | 'clear'`
- **`AutocompleteSingleProps<T>`** — Props for single-select mode
- **`AutocompleteMultipleProps<T>`** — Props for multi-select mode (adds `maxItems`, `renderTag`, `limitTags`, etc.)
- **`AutocompleteProps<T>`** — Discriminated union of the two modes

### Internal Logic
- **`AutocompleteInner`** — Core render function wrapped with `forwardRef`, managing:
  - Controlled/uncontrolled input value state
  - Dropdown open/close via Radix `PopoverPrimitive`
  - Option filtering (client-side or delegated via `disableClientFilter`)
  - Keyboard navigation (`ArrowDown/Up`, `Enter`, `Escape`)
  - Tag overflow via `useAutoLimitTags` hook
  - `freeSolo` and `creatable` modes

## Usage Example

```typescript
// Single select
<Autocomplete
  options={[{ label: "Option A", value: "a" }, { label: "Option B", value: "b" }]}
  value={selected}
  onChange={(val) => setSelected(val)}
  label="Pick one"
  placeholder="Search..."
/>

// Multi-select with tag limit and creatable
<Autocomplete
  multiple
  options={options}
  value={selectedValues}
  onChange={(vals) => setSelectedValues(vals)}
  limitTags={3}
  creatable
  onCreateOption={(input) => persistNewOption(input)}
  label="Tags"
/>

// Server-side filtering
<Autocomplete
  options={serverOptions}
  value={value}
  onChange={setValue}
  disableClientFilter
  onInputChange={(query, reason) => fetchOptions(query)}
/>
```