import * as _angular_core from '@angular/core';
import { SdFormControl } from '@sdcorejs/angular/forms/models';

/** Visual / `data-state` of the inline input. `'auto'` derives from focus + value. */
type SdInlineTextState = 'auto' | 'pending' | 'active' | 'focus' | 'error';
/** `'standalone'` draws its own affordance (hover bg + focus ring); `'seamless'` defers all chrome to the host. */
type SdInlineTextChrome = 'standalone' | 'seamless';
/**
 * Borderless, content-hugging text input — the seamless primitive shared by
 * `sd-input` / `sd-input-number` (`viewed='inline'`) and the query-bar / query-builder chips.
 *
 * why: a native `<input>` inside `mat-form-field` cannot hug its content, so inline-edit
 * looked like a full-width input rather than text. This primitive renders a raw `<input>`
 * sized via the native `size` attribute (clamped) so the click/hover target tracks the value.
 *
 * It is intentionally unopinionated about commit/parse/format: it forwards the raw DOM events
 * (focus / blur / keydown / paste / composition / Enter / Escape) so each consumer keeps its own
 * logic (e.g. sd-input-number's vi-VN formatting). Two binding modes:
 *  - **uncontrolled** via `[(value)]` — used by the chips' signal drafts;
 *  - **controlled** via `[control]` (an external `SdFormControl`) — used by the form controls.
 */
declare class SdInlineText {
    /** Uncontrolled value (two-way). Ignored when `[control]` is provided. */
    readonly value: _angular_core.ModelSignal<string>;
    /** Optional external FormControl (controlled mode) — used by sd-input / sd-input-number. */
    readonly control: _angular_core.InputSignal<SdFormControl | undefined>;
    readonly placeholder: _angular_core.InputSignal<string>;
    readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
    /** Show a hover/value-gated clear-× (default `true`). */
    readonly clearable: _angular_core.InputSignalWithTransform<boolean, unknown>;
    /** `'auto'` derives state from focus + value; pass an explicit value (e.g. `'error'`) to override. */
    readonly state: _angular_core.InputSignal<SdInlineTextState>;
    readonly chrome: _angular_core.InputSignal<SdInlineTextChrome>;
    readonly autoId: _angular_core.InputSignal<string | undefined>;
    readonly autofocus: _angular_core.InputSignalWithTransform<boolean, unknown>;
    /** Lower bound (chars) so short/empty values keep a clickable target. */
    readonly minSize: _angular_core.InputSignal<number>;
    readonly cleared: _angular_core.OutputEmitterRef<void>;
    readonly keyupEnter: _angular_core.OutputEmitterRef<void>;
    readonly keydownEscape: _angular_core.OutputEmitterRef<void>;
    readonly sdFocus: _angular_core.OutputEmitterRef<FocusEvent>;
    readonly sdBlur: _angular_core.OutputEmitterRef<FocusEvent>;
    readonly sdKeydown: _angular_core.OutputEmitterRef<KeyboardEvent>;
    readonly sdPaste: _angular_core.OutputEmitterRef<ClipboardEvent>;
    readonly sdCompositionStart: _angular_core.OutputEmitterRef<CompositionEvent>;
    readonly sdCompositionEnd: _angular_core.OutputEmitterRef<CompositionEvent>;
    private readonly inputRef;
    /** Bumped on input/blur/composition + bound-control changes so size/state methods re-eval under OnPush. */
    protected readonly tick: _angular_core.WritableSignal<number>;
    protected readonly focused: _angular_core.WritableSignal<boolean>;
    constructor();
    /**
     * Current text — from the bound control in controlled mode, else the value model.
     * why: `tick` is a tracked dependency so the computed re-runs when a bound control's
     * value changes programmatically (control.value itself is not a signal).
     */
    protected readonly currentText: _angular_core.Signal<string>;
    protected readonly hasValue: _angular_core.Signal<boolean>;
    protected readonly sizeOf: _angular_core.Signal<number>;
    protected readonly showClear: _angular_core.Signal<boolean>;
    protected readonly effectiveState: _angular_core.Signal<SdInlineTextState>;
    protected onInput(ev: Event): void;
    protected onFocus(ev: FocusEvent): void;
    protected onBlur(ev: FocusEvent): void;
    protected onKeyup(ev: KeyboardEvent): void;
    protected onKeydown(ev: KeyboardEvent): void;
    protected onPaste(ev: ClipboardEvent): void;
    protected onCompositionStart(ev: CompositionEvent): void;
    protected onCompositionEnd(ev: CompositionEvent): void;
    protected clear(ev: Event): void;
    /** Focus the native input. */
    focus(): void;
    /** Blur the native input. */
    blur(): void;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdInlineText, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdInlineText, "sd-inline-text", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; "chrome": { "alias": "chrome"; "required": false; "isSignal": true; }; "autoId": { "alias": "autoId"; "required": false; "isSignal": true; }; "autofocus": { "alias": "autofocus"; "required": false; "isSignal": true; }; "minSize": { "alias": "minSize"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "cleared": "cleared"; "keyupEnter": "keyupEnter"; "keydownEscape": "keydownEscape"; "sdFocus": "sdFocus"; "sdBlur": "sdBlur"; "sdKeydown": "sdKeydown"; "sdPaste": "sdPaste"; "sdCompositionStart": "sdCompositionStart"; "sdCompositionEnd": "sdCompositionEnd"; }, never, never, true, never>;
}

export { SdInlineText };
export type { SdInlineTextChrome, SdInlineTextState };
