import * as _angular_core from '@angular/core'; import { TemplateRef } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; /** One node in the cascader tree. */ interface WrCascaderOption { /** Value contributed when this node is part of the selection path. */ readonly value: T; /** Display label for this node. */ readonly label: string; /** Disable interaction for this node. @default false */ readonly disabled?: boolean; /** Children. Absence (or empty array) marks this as a leaf. */ readonly children?: readonly WrCascaderOption[]; } /** * Multi-level select — drills down through hierarchical categories * (e.g. country → state → city). Each level renders as a column; clicks * advance to the next column. Selecting a leaf (no children) commits * the full path. * * Implements `ControlValueAccessor` — value is the path through the * tree as a `readonly T[]`. * * @example * ```html * * ``` * * ```ts * locations: WrCascaderOption[] = [ * { * value: 'us', label: 'United States', children: [ * { value: 'ny', label: 'New York', children: [ * { value: 'nyc', label: 'NYC' }, * { value: 'buf', label: 'Buffalo' }, * ] }, * ], * }, * ]; * ``` * * @see https://ngwr.dev/components/cascader */ type WrCascaderSize = 'sm' | 'md' | 'lg'; declare class WrCascader implements ControlValueAccessor { /** Root-level options. Each may have `children` for deeper levels. */ readonly options: _angular_core.InputSignal[]>; /** Placeholder shown when no path is selected. @default '' */ readonly placeholder: _angular_core.InputSignal; /** Disable the cascader. */ readonly disabled: _angular_core.InputSignalWithTransform; /** Control size — shares the `--wr-control-*` contract. @default 'md' */ readonly size: _angular_core.InputSignal; /** Show a clear-all (×) button on the trigger when a path is selected. @default true */ readonly clearable: _angular_core.InputSignalWithTransform; /** * Allow selecting non-leaf (parent) nodes. When `false`, only leaves * (nodes without children) commit a selection. @default false */ readonly changeOnSelect: _angular_core.InputSignalWithTransform; /** Separator between labels in the trigger display. @default '/' */ readonly separator: _angular_core.InputSignal; /** Committed selection path (full T[] from root to leaf). @internal */ protected readonly path: _angular_core.WritableSignal; /** Currently-expanded column path — drives which columns the panel shows. @internal */ protected readonly activePath: _angular_core.WritableSignal; protected readonly open: _angular_core.WritableSignal; /** Panel id used by the trigger's `aria-controls`. */ protected readonly panelId: string; private readonly disabledFromCva; protected readonly isDisabled: _angular_core.Signal; /** * Columns visible in the panel. Each column shows the children of the * preceding activePath entry. Column 0 = root options. The last * column is whatever the deepest active node's children resolve to — * we only render a column when there are children to show. */ protected readonly columns: _angular_core.Signal[])[]>; /** Label trail joined by `separator()` — what the trigger shows. */ protected readonly displayLabel: _angular_core.Signal; protected readonly hasSelection: _angular_core.Signal; protected readonly classes: _angular_core.Signal; protected readonly panelTpl: _angular_core.Signal>; private readonly host; private readonly overlay; private readonly vcr; private readonly scrollStrategies; private readonly destroyRef; private overlayRef; private onChange; protected onTouched: () => void; constructor(); protected onTriggerClick(): void; protected onOptionClick(colIndex: number, opt: WrCascaderOption, event: Event): void; protected clearSelection(event: Event): void; protected isActiveAt(colIndex: number, value: T): boolean; writeValue(value: unknown): void; registerOnChange(fn: (value: readonly T[]) => void): void; registerOnTouched(fn: () => void): void; setDisabledState(isDisabled: boolean): void; private openOverlay; private closeOverlay; static ɵfac: _angular_core.ɵɵFactoryDeclaration, never>; static ɵcmp: _angular_core.ɵɵComponentDeclaration, "wr-cascader", never, { "options": { "alias": "options"; "required": true; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "changeOnSelect": { "alias": "changeOnSelect"; "required": false; "isSignal": true; }; "separator": { "alias": "separator"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>; } export { WrCascader }; export type { WrCascaderOption, WrCascaderSize };