import * as _angular_core from '@angular/core';
import { OnInit, Signal, TemplateRef } from '@angular/core';
import { FormGroup, FormControl } from '@angular/forms';
import { MatFormFieldAppearance, FloatLabelType } from '@angular/material/form-field';
import { MatInput } from '@angular/material/input';
import { MatSelect, MatSelectChange } from '@angular/material/select';
import { SdItemDefDefDirective, SdViewDefDirective } from '@sdcorejs/angular/forms/directives';
import { SdViewed, SdViewedInput, SdCustomValidator, SdSearch, SdSelectionData, SdFormControl } from '@sdcorejs/angular/forms/models';
import { Size } from '@sdcorejs/utils/models';

declare class SdSelect<T extends object | string | number = Record<string, unknown>> implements OnInit {
    #private;
    id: string;
    matInputRef: Signal<MatInput | undefined>;
    selectRef: Signal<MatSelect | undefined>;
    sdLabelTemplate: Signal<TemplateRef<any> | undefined>;
    sdValueTemplate: Signal<TemplateRef<any> | undefined>;
    /**
     * Custom render for the SELECTED value shown in the editable trigger (`<mat-select-trigger>`).
     * Distinct from `#sdValue`/`sdViewDef` which only drive the read-only `viewed`/`inline` face.
     * Context: `{ $implicit, item, items: selectedItems(), display, multiple }` — `item`/`$implicit`
     * is the single selected item object (single mode) or the selected-item array (multiple mode).
     * Falls back to the plain `display` text when not projected, so existing usages are unaffected.
     */
    sdSelectedTemplate: Signal<TemplateRef<any> | undefined>;
    itemDef: Signal<SdItemDefDefDirective<any> | undefined>;
    sdViewDef: Signal<SdViewDefDirective<any, any> | undefined>;
    /**
     * View display template. `sdViewDef` is now just a custom override of the view rendering —
     * it replaces the projected `#sdValue` template when present (fed into `<sd-view>`'s
     * `valueTemplate`), so there is ONE rendering path. No more `.sd-view` class / focus-swap;
     * click-to-edit is governed by `viewed='inline'`.
     */
    readonly viewTemplate: Signal<TemplateRef<any> | undefined>;
    autoIdInput: _angular_core.InputSignal<string | null | undefined>;
    autoId: Signal<string | undefined>;
    readonly dataDisabled: Signal<"true" | "false">;
    readonly dataInvalid: Signal<"true" | "false">;
    readonly dataEmpty: Signal<"true" | "false">;
    readonly dataValue: Signal<string>;
    readonly dataLoading: Signal<"true" | "false">;
    readonly dataRequired: Signal<"true" | "false">;
    readonly dataErrorMessage: Signal<string | null>;
    name: _angular_core.InputSignal<string>;
    size: _angular_core.InputSignal<Size>;
    form: _angular_core.InputSignalWithTransform<FormGroup<any> | undefined, any>;
    label: _angular_core.InputSignal<string | undefined>;
    helperText: _angular_core.InputSignal<string | undefined>;
    placeholder: _angular_core.InputSignal<string | undefined>;
    valueField: _angular_core.InputSignal<T extends object ? { [Key in keyof T & string]: T[Key] extends string | number | boolean | Function | Date | null | undefined ? Key : T[Key] extends any[] ? Key : T[Key] extends object ? Key | `${Key}.${T[Key] extends infer T_1 ? T_1 extends T[Key] ? T_1 extends object ? { [Key_1 in keyof T_1 & string]: T_1[Key_1] extends string | number | boolean | Function | Date | null | undefined ? Key_1 : T_1[Key_1] extends any[] ? Key_1 : T_1[Key_1] extends object ? Key_1 | `${Key_1}.${T_1[Key_1] extends infer T_2 ? T_2 extends T_1[Key_1] ? T_2 extends object ? { [Key_2 in keyof T_2 & string]: T_2[Key_2] extends string | number | boolean | Function | Date | null | undefined ? Key_2 : T_2[Key_2] extends any[] ? Key_2 : T_2[Key_2] extends object ? Key_2 | `${Key_2}.${T_2[Key_2] extends infer T_3 ? T_3 extends T_2[Key_2] ? T_3 extends object ? { [Key_3 in keyof T_3 & string]: T_3[Key_3] extends string | number | boolean | Function | Date | null | undefined ? Key_3 : T_3[Key_3] extends any[] ? Key_3 : T_3[Key_3] extends object ? Key_3 : Key_3; }[keyof T_3 & string] : string : never : never}` : Key_2; }[keyof T_2 & string] : string : never : never}` : Key_1; }[keyof T_1 & string] : string : never : never}` : Key; }[keyof T & string] : string>;
    displayField: _angular_core.InputSignal<T extends object ? { [Key in keyof T & string]: T[Key] extends string | number | boolean | Function | Date | null | undefined ? Key : T[Key] extends any[] ? Key : T[Key] extends object ? Key | `${Key}.${T[Key] extends infer T_1 ? T_1 extends T[Key] ? T_1 extends object ? { [Key_1 in keyof T_1 & string]: T_1[Key_1] extends string | number | boolean | Function | Date | null | undefined ? Key_1 : T_1[Key_1] extends any[] ? Key_1 : T_1[Key_1] extends object ? Key_1 | `${Key_1}.${T_1[Key_1] extends infer T_2 ? T_2 extends T_1[Key_1] ? T_2 extends object ? { [Key_2 in keyof T_2 & string]: T_2[Key_2] extends string | number | boolean | Function | Date | null | undefined ? Key_2 : T_2[Key_2] extends any[] ? Key_2 : T_2[Key_2] extends object ? Key_2 | `${Key_2}.${T_2[Key_2] extends infer T_3 ? T_3 extends T_2[Key_2] ? T_3 extends object ? { [Key_3 in keyof T_3 & string]: T_3[Key_3] extends string | number | boolean | Function | Date | null | undefined ? Key_3 : T_3[Key_3] extends any[] ? Key_3 : T_3[Key_3] extends object ? Key_3 : Key_3; }[keyof T_3 & string] : string : never : never}` : Key_2; }[keyof T_2 & string] : string : never : never}` : Key_1; }[keyof T_1 & string] : string : never : never}` : Key; }[keyof T & string] : string>;
    disabledField: _angular_core.InputSignal<"" | (T extends object ? { [Key in keyof T & string]: T[Key] extends string | number | boolean | Function | Date | null | undefined ? Key : T[Key] extends any[] ? Key : T[Key] extends object ? Key | `${Key}.${T[Key] extends infer T_1 ? T_1 extends T[Key] ? T_1 extends object ? { [Key_1 in keyof T_1 & string]: T_1[Key_1] extends string | number | boolean | Function | Date | null | undefined ? Key_1 : T_1[Key_1] extends any[] ? Key_1 : T_1[Key_1] extends object ? Key_1 | `${Key_1}.${T_1[Key_1] extends infer T_2 ? T_2 extends T_1[Key_1] ? T_2 extends object ? { [Key_2 in keyof T_2 & string]: T_2[Key_2] extends string | number | boolean | Function | Date | null | undefined ? Key_2 : T_2[Key_2] extends any[] ? Key_2 : T_2[Key_2] extends object ? Key_2 | `${Key_2}.${T_2[Key_2] extends infer T_3 ? T_3 extends T_2[Key_2] ? T_3 extends object ? { [Key_3 in keyof T_3 & string]: T_3[Key_3] extends string | number | boolean | Function | Date | null | undefined ? Key_3 : T_3[Key_3] extends any[] ? Key_3 : T_3[Key_3] extends object ? Key_3 : Key_3; }[keyof T_3 & string] : string : never : never}` : Key_2; }[keyof T_2 & string] : string : never : never}` : Key_1; }[keyof T_1 & string] : string : never : never}` : Key; }[keyof T & string] : string)>;
    cacheChecksum: _angular_core.InputSignal<any>;
    limit: _angular_core.InputSignal<number>;
    hyperlink: _angular_core.InputSignal<string | null | undefined>;
    minWidthPanel: _angular_core.InputSignalWithTransform<string | number, string | number | null | undefined>;
    hideInlineError: _angular_core.InputSignalWithTransform<boolean, unknown>;
    required: _angular_core.InputSignalWithTransform<boolean, unknown>;
    disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
    /** Display mode: `false` edit · `true` static view · `'inline'` view + click-to-edit (bare editor). */
    viewed: _angular_core.InputSignalWithTransform<SdViewed, SdViewedInput>;
    multiple: _angular_core.InputSignalWithTransform<boolean, unknown>;
    /**
     * Whether the `viewed='inline'` text face shows a hover clear-× to empty the value.
     * Default `true`. Set `false` where the HOST owns removal (e.g. `<sd-query-bar>` chips,
     * whose own `×` removes the whole filter) so the chip isn't cluttered with two ×.
     */
    clearable: _angular_core.InputSignalWithTransform<boolean, unknown>;
    /** `true` when `viewed === 'inline'` — editor mounted but chrome hidden; sd-view text is the trigger face. */
    readonly isInline: Signal<boolean>;
    /** `true` when `viewed === true` — static read-only view, no editor mounted. */
    readonly isViewed: Signal<boolean>;
    /** Open the picker from the inline text face. No-op unless `viewed='inline'`. */
    enterInlineEdit: () => void;
    validator: _angular_core.InputSignal<SdCustomValidator | undefined>;
    inlineError: _angular_core.InputSignal<string | undefined>;
    /**
     * Tổng hợp error message để hiển thị trong tooltip khi hideInlineError = true.
     */
    readonly errorMessage: Signal<string | undefined>;
    appearanceInput: _angular_core.InputSignal<MatFormFieldAppearance | undefined>;
    appearance: Signal<MatFormFieldAppearance>;
    floatLabel: _angular_core.InputSignal<FloatLabelType>;
    items: _angular_core.InputSignal<SdSearch | T[] | Signal<T[]> | null | undefined>;
    valueModel: _angular_core.ModelSignal<string | number | boolean | (string | number)[] | null | undefined>;
    sdChange: _angular_core.OutputEmitterRef<any>;
    sdSelection: _angular_core.OutputEmitterRef<SdSelectionData<any>>;
    formControl: SdFormControl;
    inputControl: FormControl<string | null>;
    loading: _angular_core.WritableSignal<boolean>;
    focused: _angular_core.WritableSignal<boolean>;
    allSelected: boolean;
    actualItems: Signal<SdSearch | T[] | null | undefined>;
    filteredItems: _angular_core.WritableSignal<T[]>;
    selectedItems: _angular_core.WritableSignal<T[]>;
    display: _angular_core.WritableSignal<string>;
    calculatedPanelWidth: _angular_core.WritableSignal<string | number>;
    normalizedValue: Signal<string | number | boolean | (string | number | boolean)[] | null | undefined>;
    filtered: Signal<boolean>;
    delayTime: Signal<0 | 500>;
    itemValue: (item: T) => unknown;
    itemDisplay: (item: T) => string;
    itemDisabled: (item: T) => boolean;
    setNestedValue: (obj: any, path: string, value: any) => void;
    tooltip: Signal<string>;
    updatePanelWidth: () => void;
    constructor();
    ngOnInit(): void;
    onSelectionChange: (change: MatSelectChange) => void;
    reValidate: () => void;
    clear: ($event?: any) => void;
    onClick: () => void;
    focus: () => void;
    /** Open the select panel programmatically (anchors to the mat-select trigger). */
    open: () => void;
    onOpenedChange: (isOpened: boolean) => void;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdSelect<any>, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdSelect<any>, "sd-select", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "helperText": { "alias": "helperText"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "valueField": { "alias": "valueField"; "required": true; "isSignal": true; }; "displayField": { "alias": "displayField"; "required": true; "isSignal": true; }; "disabledField": { "alias": "disabledField"; "required": false; "isSignal": true; }; "cacheChecksum": { "alias": "cacheChecksum"; "required": false; "isSignal": true; }; "limit": { "alias": "limit"; "required": false; "isSignal": true; }; "hyperlink": { "alias": "hyperlink"; "required": false; "isSignal": true; }; "minWidthPanel": { "alias": "minWidthPanel"; "required": false; "isSignal": true; }; "hideInlineError": { "alias": "hideInlineError"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "validator": { "alias": "validator"; "required": false; "isSignal": true; }; "inlineError": { "alias": "inlineError"; "required": false; "isSignal": true; }; "appearanceInput": { "alias": "appearance"; "required": false; "isSignal": true; }; "floatLabel": { "alias": "floatLabel"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "valueModel": { "alias": "model"; "required": false; "isSignal": true; }; }, { "valueModel": "modelChange"; "sdChange": "sdChange"; "sdSelection": "sdSelection"; }, ["sdLabelTemplate", "sdValueTemplate", "sdSelectedTemplate", "itemDef", "sdViewDef"], ["[sdLabel]"], true, never>;
}

export { SdSelect };
