import * as i0 from '@angular/core';
import { viewChild, contentChild, inject, ChangeDetectorRef, input, computed, booleanAttribute, model, output, EventEmitter, effect, untracked, Output, ChangeDetectionStrategy, Component } from '@angular/core';
import * as i2 from '@angular/forms';
import { NgForm, FormGroup, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
import * as uuid from 'uuid';
import * as i1 from '@angular/common';
import { CommonModule } from '@angular/common';
import { MatButtonModule } from '@angular/material/button';
import * as i3 from '@angular/material/form-field';
import { MatFormFieldModule } from '@angular/material/form-field';
import * as i5 from '@angular/material/icon';
import { MatIconModule } from '@angular/material/icon';
import * as i4 from '@angular/material/input';
import { MatInputModule } from '@angular/material/input';
import * as i6 from '@angular/material/tooltip';
import { MatTooltipModule } from '@angular/material/tooltip';
import { SdView } from '@sdcorejs/angular/components/view';
import { SdInlineText } from '@sdcorejs/angular/forms/inline-text';
import { SD_CORE_CONFIGURATION } from '@sdcorejs/angular/configurations';
import { SdViewDefDirective, SdSuffixDefDirective } from '@sdcorejs/angular/forms/directives';
import { SdLabel } from '@sdcorejs/angular/forms/label';
import { I18nService } from '@sdcorejs/angular/i18n';
import { SD_FORM_CONFIGURATION, sdFormControlState, sdViewedTransform, sdViewedInline, SdFormControl, HandleSdCustomValidator, SdInlineErrorValidator } from '@sdcorejs/angular/forms/models';
import { sdIsEmpty, sdSerializeDataValue } from '@sdcorejs/angular/utilities/data-state';
import { SdFormatNumberPipe } from '@sdcorejs/angular/pipes';
import { NumberUtilities } from '@sdcorejs/angular/utilities/extensions';
import { Subscription } from 'rxjs';

class SdInputNumberErrotStateMatcher {
    formControl;
    constructor(formControl) {
        this.formControl = formControl;
    }
    isErrorState(control, form) {
        const isSubmitted = form && form.submitted;
        return !!(this.formControl?.invalid && (this.formControl?.dirty || this.formControl?.touched || isSubmitted));
    }
}
class SdInputNumber {
    id = `I${uuid.v4()}`;
    // ==========================================
    // 1. SIGNAL QUERIES
    // ==========================================
    control = viewChild('control', ...(ngDevMode ? [{ debugName: "control" }] : []));
    /** The inline primitive — only present when `viewed='inline'`; drives focus/blur in that mode. */
    inlineRef = viewChild(SdInlineText, ...(ngDevMode ? [{ debugName: "inlineRef" }] : []));
    sdLabelTemplate = contentChild('sdLabel', ...(ngDevMode ? [{ debugName: "sdLabelTemplate" }] : []));
    sdValueTemplate = contentChild('sdValue', ...(ngDevMode ? [{ debugName: "sdValueTemplate" }] : []));
    sdViewDef = contentChild(SdViewDefDirective, ...(ngDevMode ? [{ debugName: "sdViewDef" }] : []));
    sdSuffixDef = contentChild(SdSuffixDefDirective, ...(ngDevMode ? [{ debugName: "sdSuffixDef" }] : []));
    // ==========================================
    // 2. INJECTS
    // ==========================================
    ref = inject(ChangeDetectorRef);
    coreConfiguration = inject(SD_CORE_CONFIGURATION, { optional: true });
    formatNumberPipe = inject(SdFormatNumberPipe);
    formConfig = inject(SD_FORM_CONFIGURATION, { optional: true });
    #i18n = inject(I18nService);
    // ==========================================
    // 3. SIGNAL INPUTS & MODEL
    // ==========================================
    autoIdInput = input(undefined, ...(ngDevMode ? [{ debugName: "autoIdInput", alias: 'autoId' }] : [{ alias: 'autoId' }]));
    autoId = computed(() => (this.autoIdInput() ? `forms-input-number-${this.autoIdInput()}` : undefined), ...(ngDevMode ? [{ debugName: "autoId" }] : []));
    #state = sdFormControlState(computed(() => this.formControl));
    dataDisabled = computed(() => (this.#state().disabled ? 'true' : 'false'), ...(ngDevMode ? [{ debugName: "dataDisabled" }] : []));
    dataInvalid = computed(() => (this.#state().invalid ? 'true' : 'false'), ...(ngDevMode ? [{ debugName: "dataInvalid" }] : []));
    dataEmpty = computed(() => (sdIsEmpty(this.#state().value) ? 'true' : 'false'), ...(ngDevMode ? [{ debugName: "dataEmpty" }] : []));
    dataValue = computed(() => sdSerializeDataValue(this.#state().value), ...(ngDevMode ? [{ debugName: "dataValue" }] : []));
    dataRequired = computed(() => (this.required() ? 'true' : 'false'), ...(ngDevMode ? [{ debugName: "dataRequired" }] : []));
    dataErrorMessage = computed(() => {
        void this.#state();
        const msg = this.errorMessage();
        return msg && msg.length > 0 ? msg : null;
    }, ...(ngDevMode ? [{ debugName: "dataErrorMessage" }] : []));
    name = input(uuid.v4(), ...(ngDevMode ? [{ debugName: "name" }] : []));
    size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
    // Ghi (TransformT): any (để không bị lỗi typing khi cha truyền vào)
    form = input(undefined, ...(ngDevMode ? [{ debugName: "form", transform: (val) => {
                if (!val)
                    return undefined;
                // Nếu cha truyền vào NgForm (template-driven) -> Bóc lấy FormGroup bên trong
                if (val instanceof NgForm)
                    return val.form;
                // Nếu cha truyền sẵn FormGroup (reactive) -> Lấy luôn
                if (val instanceof FormGroup)
                    return val;
                // Fallback an toàn phòng trường hợp cha truyền 1 object chứa form
                if (val?.form instanceof FormGroup)
                    return val.form;
                return undefined;
            } }] : [{
            transform: (val) => {
                if (!val)
                    return undefined;
                // Nếu cha truyền vào NgForm (template-driven) -> Bóc lấy FormGroup bên trong
                if (val instanceof NgForm)
                    return val.form;
                // Nếu cha truyền sẵn FormGroup (reactive) -> Lấy luôn
                if (val instanceof FormGroup)
                    return val;
                // Fallback an toàn phòng trường hợp cha truyền 1 object chứa form
                if (val?.form instanceof FormGroup)
                    return val.form;
                return undefined;
            },
        }]));
    label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
    helperText = input(...(ngDevMode ? [undefined, { debugName: "helperText" }] : []));
    placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : []));
    hideInlineError = input(false, ...(ngDevMode ? [{ debugName: "hideInlineError", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
    blurOnEnter = input(false, ...(ngDevMode ? [{ debugName: "blurOnEnter", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
    required = input(false, ...(ngDevMode ? [{ debugName: "required", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
    readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
    disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
    /** Display mode: `false` edit · `true` static view · `'inline'` borderless inline-edit (input IS the face). */
    viewed = input(false, ...(ngDevMode ? [{ debugName: "viewed", transform: sdViewedTransform }] : [{ transform: sdViewedTransform }]));
    // Tri-state `viewed` — shared primitive. No panel; in `'inline'` the input is borderless/transparent.
    #viewedState = sdViewedInline(this.viewed, () => this.#focusActiveInput(), this.disabled);
    /** Focus whichever input is live: the inline primitive in `'inline'` mode, else the mat input. */
    #focusActiveInput = () => {
        const inline = this.inlineRef();
        if (inline)
            inline.focus();
        else
            this.control()?.nativeElement?.focus();
    };
    /** `true` when `viewed === 'inline'`. */
    isInline = this.#viewedState.isInline;
    /** `true` when `viewed === true` (static view, no input). */
    isViewed = this.#viewedState.isViewed;
    /** Focus the inline input. No-op unless `viewed='inline'`. */
    enterInlineEdit = () => this.#viewedState.enterInlineEdit();
    /** View display template: `sdViewDef` overrides the projected `#sdValue` for the static view (unified). */
    viewTemplate = computed(() => this.sdViewDef()?.templateRef ?? this.sdValueTemplate(), ...(ngDevMode ? [{ debugName: "viewTemplate" }] : []));
    type = input(...(ngDevMode ? [undefined, { debugName: "type" }] : []));
    precision = input(3, ...(ngDevMode ? [{ debugName: "precision" }] : []));
    format = input(undefined, ...(ngDevMode ? [{ debugName: "format" }] : []));
    min = input(undefined, ...(ngDevMode ? [{ debugName: "min", transform: v => (v == null ? undefined : Number(v)) }] : [{ transform: v => (v == null ? undefined : Number(v)) }]));
    max = input(undefined, ...(ngDevMode ? [{ debugName: "max", transform: v => (v == null ? undefined : Number(v)) }] : [{ transform: v => (v == null ? undefined : Number(v)) }]));
    validator = input(...(ngDevMode ? [undefined, { debugName: "validator" }] : []));
    inlineError = input(...(ngDevMode ? [undefined, { debugName: "inlineError" }] : []));
    /**
     * Tổng hợp error message để hiển thị trong tooltip khi hideInlineError = true.
     */
    errorMessage = computed(() => {
        void this.#state();
        const errors = this.formControl.errors;
        if (!errors)
            return undefined;
        if (errors['required'])
            return this.#i18n.t('core.form.input-number.required');
        if (errors['min'])
            return this.#i18n.t('core.form.input-number.min', { min: this.min() ?? '' });
        if (errors['max'])
            return this.#i18n.t('core.form.input-number.max', { max: this.max() ?? '' });
        if (errors['customValidator'])
            return errors['customValidator'];
        if (errors['inlineError'])
            return this.inlineError();
        return undefined;
    }, ...(ngDevMode ? [{ debugName: "errorMessage" }] : []));
    hyperlink = input(...(ngDevMode ? [undefined, { debugName: "hyperlink" }] : []));
    appearanceInput = input(undefined, ...(ngDevMode ? [{ debugName: "appearanceInput", alias: 'appearance' }] : [{ alias: 'appearance' }]));
    appearance = computed(() => this.appearanceInput() ?? this.formConfig?.appearance ?? 'outline', ...(ngDevMode ? [{ debugName: "appearance" }] : []));
    floatLabel = input('auto', ...(ngDevMode ? [{ debugName: "floatLabel" }] : []));
    valueModel = model(undefined, ...(ngDevMode ? [{ debugName: "valueModel", alias: 'model' }] : [{ alias: 'model' }]));
    // ==========================================
    // 4. SIGNAL OUTPUTS (Giữ lại sdFocusForceBlur)
    // ==========================================
    sdChange = output();
    sdFocus = output();
    sdBlur = output();
    keyupEnter = output();
    // why: same lý do như sd-input — sdChange fire per-keystroke. `cleared` là
    // intent dedicated cho X (clear button), consumer dùng để trigger reload ngay.
    cleared = output();
    sdFocusForceBlur = new EventEmitter();
    // ==========================================
    // 5. INTERNAL STATE & COMPUTED
    // ==========================================
    formControl = new SdFormControl();
    inputControl = new SdFormControl();
    #subscription = new Subscription();
    matcher = new SdInputNumberErrotStateMatcher(this.formControl);
    #preCompositionValue;
    isFocused = false;
    // Dùng computed thay cho getter cũ để tận dụng cache
    decimalSeparator = computed(() => {
        const fmt = this.format() ?? this.coreConfiguration?.format?.number;
        return fmt === '1.234.567,89' ? ',' : '.';
    }, ...(ngDevMode ? [{ debugName: "decimalSeparator" }] : []));
    thousandsSeparator = computed(() => {
        const fmt = this.format() ?? this.coreConfiguration?.format?.number;
        return fmt === '1.234.567,89' ? '.' : ',';
    }, ...(ngDevMode ? [{ debugName: "thousandsSeparator" }] : []));
    regexPattern = computed(() => {
        const decimal = this.decimalSeparator();
        const thousand = this.thousandsSeparator();
        const escDecimal = decimal === '.' ? '\\.' : decimal;
        const escThousand = thousand === '.' ? '\\.' : thousand;
        const integerPart = `(([0-9]+(${escThousand}[0-9])?)+)`;
        const decimalPart = this.precision() > 0 ? `(${escDecimal}[0-9]{0,${this.precision()}})?` : '';
        const baseReg = `${integerPart}${decimalPart}$`;
        if (this.type() === 'negative')
            return `[-]${baseReg}`;
        if (!this.type())
            return `[-]?${baseReg}`;
        return baseReg;
    }, ...(ngDevMode ? [{ debugName: "regexPattern" }] : []));
    constructor() {
        // EFFECT 1: Sync model thay đổi từ bên ngoài (Parent -> Component)
        effect(() => {
            const val = this.valueModel();
            untracked(() => {
                if (this.formControl.value !== val) {
                    this.formControl.setValue(val, { emitEvent: false });
                    if (val != null && val !== '') {
                        const strVal = val.toString().replace(/\./g, this.decimalSeparator());
                        this.inputControl.setValue(this.#getValueWithFormat(strVal), { emitEvent: false });
                    }
                    else {
                        this.inputControl.setValue('', { emitEvent: false });
                    }
                }
            });
        });
        // EFFECT 2: Sync Disable
        effect(() => {
            if (this.disabled()) {
                this.inputControl.disable({ emitEvent: false });
                this.formControl.disable({ emitEvent: false });
            }
            else {
                this.inputControl.enable({ emitEvent: false });
                this.formControl.enable({ emitEvent: false });
            }
        });
        // EFFECT 3: Update Validator
        effect(() => {
            const req = this.required();
            const minVal = this.min();
            const maxVal = this.max();
            const val = this.validator();
            const inl = this.inlineError();
            untracked(() => {
                this.#updateValidator(req, minVal, maxVal, val, inl);
            });
        });
    }
    ngOnInit() {
        this.#subscription.add(this.inputControl.touchChanges.subscribe(() => {
            this.formControl.markAsTouched();
            this.ref.markForCheck();
        }));
        this.#subscription.add(this.formControl.sdChanges.subscribe(() => {
            this.ref.markForCheck();
        }));
        this.#subscription.add(this.inputControl.sdChanges.subscribe(() => {
            this.ref.markForCheck();
        }));
    }
    ngAfterViewInit() {
        this.#subscription.add(this.inputControl.valueChanges.subscribe(() => {
            const val = this.inputControl.value;
            if (!val) {
                this.#onChange(undefined);
                return;
            }
            const value = this.#toNumber(val);
            if (!isNaN(value)) {
                this.inputControl.setValue(this.#getValueWithFormat(val), { emitEvent: false });
                this.#onChange(value);
            }
        }));
        const formGroup = this.form();
        formGroup?.addControl(this.name(), this.formControl);
        this.ref.detectChanges();
    }
    ngOnDestroy() {
        const formGroup = this.form();
        formGroup?.removeControl(this.name());
        this.#subscription.unsubscribe();
    }
    #getValueWithFormat = (value) => {
        const arrayNext = value.split(this.decimalSeparator());
        if (arrayNext.length >= 2) {
            return `${this.#formatNumber(arrayNext[0])}${this.decimalSeparator()}${arrayNext[1]}`;
        }
        return this.#formatNumber(value);
    };
    #formatNumber = (text) => {
        const fmt = this.format() ?? this.coreConfiguration?.format?.number;
        if (fmt === '1.234.567,89') {
            return NumberUtilities.toVN((text?.toString() || '').replace(/\./g, ''));
        }
        else {
            return NumberUtilities.toISO((text?.toString() || '').replace(/\,/g, ''));
        }
    };
    #toNumber = (text) => {
        const raw = text?.toString() || '';
        const value = raw.split(this.thousandsSeparator()).join('').replace(this.decimalSeparator(), '.');
        return +value;
    };
    reValidate = () => {
        this.formControl.updateValueAndValidity();
    };
    #updateValidator = (req, minVal, maxVal, val, inl) => {
        const validators = [];
        const asyncValidators = [];
        if (req)
            validators.push(Validators.required);
        if (minVal != null)
            validators.push(Validators.min(minVal));
        if (maxVal != null)
            validators.push(Validators.max(maxVal));
        if (val)
            asyncValidators.push(HandleSdCustomValidator(val));
        if (inl)
            validators.push(SdInlineErrorValidator);
        this.formControl.setValidators(validators.length ? validators : null);
        this.formControl.setAsyncValidators(asyncValidators.length ? asyncValidators : null);
        this.formControl.updateValueAndValidity({ emitEvent: false });
    };
    #onChange = (value) => {
        this.valueModel.set(value ?? null);
        this.sdChange.emit(value ?? null);
        // why: KHÔNG dùng { emitEvent: false } ở đây. formControl mang async validator
        // ([validator] → HandleSdCustomValidator). Nếu set value mà chặn event thì khi async
        // resolve, setErrors cũng chạy với emitEvent:false → AbstractControl.events không phát →
        // #state (sdFormControlState) không tick → errorMessage (computed theo #state) không
        // recompute → message lỗi không hiển thị (dù form invalid + viền đỏ). Để event lan ra để
        // #state tick. formControl.valueChanges không có subscriber nào nên không gây vòng lặp.
        this.formControl.setValue(value ?? null);
    };
    // why: method (không phải computed) để template re-eval mỗi change-detection.
    // Required không được clear; disabled/readonly ẩn nút.
    showClear = () => {
        if (this.required() || this.disabled() || this.readonly())
            return false;
        return !sdIsEmpty(this.valueModel());
    };
    clear = ($event) => {
        $event?.stopPropagation();
        if (sdIsEmpty(this.formControl.value))
            return;
        // Reset cả ô hiển thị (inputControl) lẫn giá trị thật (formControl), rồi
        // đồng bộ model + sdChange một lần.
        this.inputControl.setValue('', { emitEvent: false });
        this.formControl.setValue(null, { emitEvent: false });
        this.valueModel.set(null);
        this.sdChange.emit(null);
        this.cleared.emit();
    };
    onKeyupEnter = () => {
        const val = (this.inputControl.value ?? '').toString();
        if (val.length > val.trim().length) {
            this.inputControl.setValue(val.trim());
        }
        this.keyupEnter.emit(this.inputControl.value);
        if (this.blurOnEnter()) {
            this.blur();
        }
    };
    onKeydown = (event) => {
        if (event.ctrlKey && event.key == 'v') {
            this.#checkValue(event, '');
            return;
        }
        const key = event.keyCode || event.charCode;
        if (key == 8 || key == 46 || key == 37 || key == 39 || key == 35 || key == 36 || key == 9)
            return;
        if (event.ctrlKey && (event.key == 'c' || event.key == 'x' || event.key == 'a'))
            return;
        if (event.shiftKey && key == 9)
            return;
        this.#checkValue(event, event.key);
    };
    onPaste(event) {
        const nextKey = event?.clipboardData?.getData('text');
        this.#checkValue(event, nextKey);
    }
    onCompositionEnd(event) {
        const compositionValue = event.data;
        const regExp = new RegExp(`^${this.regexPattern()}`, 'g');
        if (compositionValue && !String(compositionValue).match(regExp)) {
            this.inputControl.setValue(this.#preCompositionValue || '');
        }
        this.#preCompositionValue = undefined;
    }
    onCompositionStart(event) {
        this.#preCompositionValue = this.inputControl.value;
    }
    #checkValue = (event, nextKey) => {
        const current = event?.target?.value;
        const curval_arr = current.split('');
        curval_arr.splice(event.target.selectionStart, event.target.selectionEnd - event.target.selectionStart, nextKey || '');
        const newval = curval_arr.join('');
        if (this.type() !== 'positive' && newval === '-')
            return;
        const regExp = new RegExp(`^${this.regexPattern()}`, 'g');
        if (newval && !String(newval).match(regExp)) {
            event.preventDefault();
            return;
        }
    };
    onFocus = () => {
        this.isFocused = true;
        this.sdFocus.emit();
        // RxJS 7 chuẩn bài
        if (this.sdFocusForceBlur.observed) {
            this.blur();
            this.sdFocusForceBlur.emit();
        }
    };
    onBlur = () => {
        this.isFocused = false;
        const val = (this.inputControl.value ?? '').toString();
        if (!val || val.trim() === '') {
            this.inputControl.setValue('', { emitEvent: false });
            this.#onChange(null);
            this.sdBlur.emit(null);
            return;
        }
        const arrayValue = val.split(this.decimalSeparator());
        if (arrayValue.length >= 2 && arrayValue[1] == '') {
            this.inputControl.setValue(this.#formatNumber(arrayValue[0]));
            return;
        }
        if (val.length > val.trim().length) {
            this.inputControl.setValue(val.trim());
        }
        this.sdBlur.emit(this.formControl.value);
    };
    onClick = () => {
        if (this.sdViewDef()?.templateRef) {
            if (!this.formControl.disabled && !this.isFocused) {
                this.focus();
            }
        }
    };
    blur = () => {
        this.isFocused = false;
        const inline = this.inlineRef();
        if (inline)
            inline.blur();
        else
            this.control()?.nativeElement?.blur();
    };
    focus = () => {
        this.isFocused = true;
        setTimeout(() => {
            this.#focusActiveInput();
        }, 100);
    };
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: SdInputNumber, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.24", type: SdInputNumber, isStandalone: true, selector: "sd-input-number", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, helperText: { classPropertyName: "helperText", publicName: "helperText", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hideInlineError: { classPropertyName: "hideInlineError", publicName: "hideInlineError", isSignal: true, isRequired: false, transformFunction: null }, blurOnEnter: { classPropertyName: "blurOnEnter", publicName: "blurOnEnter", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, viewed: { classPropertyName: "viewed", publicName: "viewed", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, precision: { classPropertyName: "precision", publicName: "precision", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, validator: { classPropertyName: "validator", publicName: "validator", isSignal: true, isRequired: false, transformFunction: null }, inlineError: { classPropertyName: "inlineError", publicName: "inlineError", isSignal: true, isRequired: false, transformFunction: null }, hyperlink: { classPropertyName: "hyperlink", publicName: "hyperlink", isSignal: true, isRequired: false, transformFunction: null }, appearanceInput: { classPropertyName: "appearanceInput", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, floatLabel: { classPropertyName: "floatLabel", publicName: "floatLabel", isSignal: true, isRequired: false, transformFunction: null }, valueModel: { classPropertyName: "valueModel", publicName: "model", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueModel: "modelChange", sdChange: "sdChange", sdFocus: "sdFocus", sdBlur: "sdBlur", keyupEnter: "keyupEnter", cleared: "cleared", sdFocusForceBlur: "sdFocusForceBlur" }, host: { properties: { "class.sd-has-label": "!!label()", "class.sd-viewed": "isViewed() || isInline()" } }, queries: [{ propertyName: "sdLabelTemplate", first: true, predicate: ["sdLabel"], descendants: true, isSignal: true }, { propertyName: "sdValueTemplate", first: true, predicate: ["sdValue"], descendants: true, isSignal: true }, { propertyName: "sdViewDef", first: true, predicate: SdViewDefDirective, descendants: true, isSignal: true }, { propertyName: "sdSuffixDef", first: true, predicate: SdSuffixDefDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "control", first: true, predicate: ["control"], descendants: true, isSignal: true }, { propertyName: "inlineRef", first: true, predicate: SdInlineText, descendants: true, isSignal: true }], ngImport: i0, template: "@let lbl = label();\n@let app = appearance();\n@let hideErr = hideInlineError();\n@let errMsg = errorMessage();\n@let hText = helperText();\n@let fmt = format();\n@let _isInline = isInline();\n\n@if (isViewed()) {\n  <sd-view\n    [label]=\"lbl\"\n    [labelTemplate]=\"sdLabelTemplate()\"\n    [value]=\"formControl.value\"\n    [display]=\"formControl.value | sdFormatNumber : undefined : fmt\"\n    [hyperlink]=\"hyperlink()\"\n    [valueTemplate]=\"viewTemplate()\">\n  </sd-view>\n} @else if (_isInline) {\n  <sd-inline-text\n    [control]=\"inputControl\"\n    [placeholder]=\"placeholder() || lbl || ''\"\n    [clearable]=\"!required()\"\n    [autoId]=\"autoId()\"\n    [state]=\"formControl.invalid && formControl.touched ? 'error' : 'auto'\"\n    (sdFocus)=\"onFocus()\"\n    (sdBlur)=\"onBlur()\"\n    (keyupEnter)=\"onKeyupEnter()\"\n    (sdKeydown)=\"onKeydown($event)\"\n    (sdPaste)=\"onPaste($event)\"\n    (sdCompositionStart)=\"onCompositionStart($event)\"\n    (sdCompositionEnd)=\"onCompositionEnd($event)\"\n    (cleared)=\"cleared.emit()\">\n  </sd-inline-text>\n} @else {\n  @if (!app) {\n    <ng-content select=\"[sdLabel]\">\n      @if (lbl) {\n        <sd-label [label]=\"lbl\" [required]=\"required()\"></sd-label>\n      }\n    </ng-content>\n  }\n\n  <div\n    class=\"d-flex align-items-center\"\n    [class.c-focused]=\"isFocused\"\n    [class.c-disabled]=\"formControl.disabled\"\n    (click)=\"onClick()\"\n    aria-hidden=\"true\">\n      <mat-form-field\n        [class.sd-md]=\"size() === 'md'\"\n        [class.sd-sm]=\"size() === 'sm'\"\n        [class.hide-inline-error]=\"hideErr\"\n        [appearance]=\"app!\"\n        [floatLabel]=\"floatLabel()\">\n        @if (app && lbl) {\n          <mat-label style=\"display: inline-block\">\n            <div style=\"display: flex; align-items: center; gap: 4px\">\n              <span>{{ lbl }}</span>\n              @if (hText) {\n                <mat-icon [matTooltip]=\"hText\" matTooltipPosition=\"below\">info_outline</mat-icon>\n              }\n            </div>\n          </mat-label>\n        }\n\n        <input\n          aria-hidden=\"true\"\n          [id]=\"id\"\n          [formControl]=\"inputControl\"\n          #control\n          matInput\n          [placeholder]=\"placeholder() || lbl || ''\"\n          [errorStateMatcher]=\"matcher\"\n          (keyup.enter)=\"onKeyupEnter()\"\n          (focus)=\"onFocus()\"\n          (blur)=\"onBlur()\"\n          (keydown)=\"onKeydown($event)\"\n          (compositionstart)=\"onCompositionStart($event)\"\n          (compositionend)=\"onCompositionEnd($event)\"\n          [required]=\"required()\"\n          [readonly]=\"readonly()\"\n          [autocomplete]=\"id\"\n          (paste)=\"onPaste($event)\"\n          autocorrect=\"off\"\n          [attr.data-autoId]=\"autoId()\"\n          [attr.data-disabled]=\"dataDisabled()\"\n          [attr.data-invalid]=\"dataInvalid()\"\n          [attr.data-empty]=\"dataEmpty()\"\n          [attr.data-value]=\"dataValue()\"\n          [attr.data-required]=\"dataRequired()\"\n          [attr.data-error-message]=\"dataErrorMessage()\" />\n\n        @if (!hideErr && errMsg && formControl.touched) {\n          <mat-error>{{ errMsg }}</mat-error>\n        }\n\n        <!-- why: n\u00FAt clear render TR\u01AF\u1EDAC error icon. Clear hover-gated (visibility:hidden) v\u1EABn\n             chi\u1EBFm ch\u1ED7 trong layout \u2192 n\u1EBFu \u0111\u1EE9ng sau s\u1EBD \u0111\u1EA9y error icon \"t\u1EE5t v\u00E0o trong\". \u0110\u1EE9ng tr\u01B0\u1EDBc\n             th\u00EC error icon n\u1EB1m s\u00E1t m\u00E9p ph\u1EA3i, clear gi\u1EEF slot v\u00F4 h\u00ECnh b\u00EAn tr\u00E1i. -->\n        @if (showClear()) {\n          <button type=\"button\" class=\"sd-clear-btn sd-hover\" matSuffix (click)=\"clear($event)\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\n            <mat-icon>close</mat-icon>\n          </button>\n        }\n\n        @if (hideErr && errMsg && formControl.touched) {\n          <mat-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"errMsg\" matTooltipPosition=\"above\"> error </mat-icon>\n        }\n\n        @if (sdSuffixDef()?.templateRef; as suffixRef) {\n          <ng-container matSuffix>\n            <ng-container [ngTemplateOutlet]=\"suffixRef\"></ng-container>\n          </ng-container>\n        }\n        <!-- <ng-container matSuffix>\n          <ng-content select=\"[sdSuffix]\"></ng-content>\n        </ng-container> -->\n      </mat-form-field>\n  </div>\n}\n", styles: [".text-primary{color:var(--sd-primary)!important}.bg-primary{background:var(--sd-primary)!important}.border-primary{border-color:var(--sd-primary)!important}.text-primary-light{color:var(--sd-primary-light)!important}.bg-primary-light{background:var(--sd-primary-light)!important}.border-primary-light{border-color:var(--sd-primary-light)!important}.text-primary-dark{color:var(--sd-primary-dark)!important}.bg-primary-dark{background:var(--sd-primary-dark)!important}.border-primary-dark{border-color:var(--sd-primary-dark)!important}.text-info{color:var(--sd-info)!important}.bg-info{background:var(--sd-info)!important}.border-info{border-color:var(--sd-info)!important}.text-info-light{color:var(--sd-info-light)!important}.bg-info-light{background:var(--sd-info-light)!important}.border-info-light{border-color:var(--sd-info-light)!important}.text-info-dark{color:var(--sd-info-dark)!important}.bg-info-dark{background:var(--sd-info-dark)!important}.border-info-dark{border-color:var(--sd-info-dark)!important}.text-success{color:var(--sd-success)!important}.bg-success{background:var(--sd-success)!important}.border-success{border-color:var(--sd-success)!important}.text-success-light{color:var(--sd-success-light)!important}.bg-success-light{background:var(--sd-success-light)!important}.border-success-light{border-color:var(--sd-success-light)!important}.text-success-dark{color:var(--sd-success-dark)!important}.bg-success-dark{background:var(--sd-success-dark)!important}.border-success-dark{border-color:var(--sd-success-dark)!important}.text-warning{color:var(--sd-warning)!important}.bg-warning{background:var(--sd-warning)!important}.border-warning{border-color:var(--sd-warning)!important}.text-warning-light{color:var(--sd-warning-light)!important}.bg-warning-light{background:var(--sd-warning-light)!important}.border-warning-light{border-color:var(--sd-warning-light)!important}.text-warning-dark{color:var(--sd-warning-dark)!important}.bg-warning-dark{background:var(--sd-warning-dark)!important}.border-warning-dark{border-color:var(--sd-warning-dark)!important}.text-error{color:var(--sd-error)!important}.bg-error{background:var(--sd-error)!important}.border-error{border-color:var(--sd-error)!important}.text-error-light{color:var(--sd-error-light)!important}.bg-error-light{background:var(--sd-error-light)!important}.border-error-light{border-color:var(--sd-error-light)!important}.text-error-dark{color:var(--sd-error-dark)!important}.bg-error-dark{background:var(--sd-error-dark)!important}.border-error-dark{border-color:var(--sd-error-dark)!important}.text-secondary{color:var(--sd-secondary)!important}.bg-secondary{background:var(--sd-secondary)!important}.border-secondary{border-color:var(--sd-secondary)!important}.text-secondary-light{color:var(--sd-secondary-light)!important}.bg-secondary-light{background:var(--sd-secondary-light)!important}.border-secondary-light{border-color:var(--sd-secondary-light)!important}.text-secondary-dark{color:var(--sd-secondary-dark)!important}.bg-secondary-dark{background:var(--sd-secondary-dark)!important}.border-secondary-dark{border-color:var(--sd-secondary-dark)!important}.text-light{color:var(--sd-light)!important}.bg-light{background:var(--sd-light)!important}.border-light{border-color:var(--sd-light)!important}.text-dark{color:var(--sd-dark)!important}.bg-dark{background:var(--sd-dark)!important}.border-dark{border-color:var(--sd-dark)!important}.text-black500{color:var(--sd-black500)!important}.bg-black500{background:var(--sd-black500)!important}.border-black500{border-color:var(--sd-black500)!important}.text-black400{color:var(--sd-black400)!important}.bg-black400{background:var(--sd-black400)!important}.border-black400{border-color:var(--sd-black400)!important}.text-black300{color:var(--sd-black300)!important}.bg-black300{background:var(--sd-black300)!important}.border-black300{border-color:var(--sd-black300)!important}.text-black200{color:var(--sd-black200)!important}.bg-black200{background:var(--sd-black200)!important}.border-black200{border-color:var(--sd-black200)!important}.text-black100{color:var(--sd-black100)!important}.bg-black100{background:var(--sd-black100)!important}.border-black100{border-color:var(--sd-black100)!important}.text-white{color:#fff!important}.bg-white{background:#fff!important}.border-white{border-color:#fff!important}.text-black{color:#000!important}.bg-black{background:#000!important}.border-black{border-color:#000!important}:host{display:block}:host(.sd-has-label){padding-top:4px}:host(.sd-viewed){padding-top:0}:host ::ng-deep .mat-mdc-form-field.mat-form-field-appearance-outline.mat-form-field-disabled .mat-mdc-text-field-wrapper{background:var(--sd-black100)}:host ::ng-deep .mat-mdc-form-field input.mat-mdc-input-element:disabled{color:var(--sd-black400)!important}:host ::ng-deep .mat-mdc-form-field .mat-mdc-placeholder-required{color:var(--sd-error)}.sd-md:hover .btn-copy{visibility:visible}.btn-copy{visibility:hidden;background:#e9e9e9!important;line-height:26px!important;margin-bottom:3px;font-size:12px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl],      input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: SdLabel, selector: "sd-label", inputs: ["label", "description", "required", "helperText"] }, { kind: "component", type: SdView, selector: "sd-view", inputs: ["label", "value", "display", "hyperlink", "labelTemplate", "valueTemplate", "selectedItems"] }, { kind: "component", type: SdInlineText, selector: "sd-inline-text", inputs: ["value", "control", "placeholder", "disabled", "clearable", "state", "chrome", "autoId", "autofocus", "minSize"], outputs: ["valueChange", "cleared", "keyupEnter", "keydownEscape", "sdFocus", "sdBlur", "sdKeydown", "sdPaste", "sdCompositionStart", "sdCompositionEnd"] }, { kind: "pipe", type: SdFormatNumberPipe, name: "sdFormatNumber" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: SdInputNumber, decorators: [{
            type: Component,
            args: [{ selector: 'sd-input-number', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, host: { '[class.sd-has-label]': '!!label()', '[class.sd-viewed]': 'isViewed() || isInline()' }, imports: [
                        CommonModule,
                        FormsModule,
                        ReactiveFormsModule,
                        MatFormFieldModule,
                        MatInputModule,
                        MatIconModule,
                        MatTooltipModule,
                        MatButtonModule,
                        SdLabel,
                        SdFormatNumberPipe,
                        SdView,
                        SdInlineText,
                    ], template: "@let lbl = label();\n@let app = appearance();\n@let hideErr = hideInlineError();\n@let errMsg = errorMessage();\n@let hText = helperText();\n@let fmt = format();\n@let _isInline = isInline();\n\n@if (isViewed()) {\n  <sd-view\n    [label]=\"lbl\"\n    [labelTemplate]=\"sdLabelTemplate()\"\n    [value]=\"formControl.value\"\n    [display]=\"formControl.value | sdFormatNumber : undefined : fmt\"\n    [hyperlink]=\"hyperlink()\"\n    [valueTemplate]=\"viewTemplate()\">\n  </sd-view>\n} @else if (_isInline) {\n  <sd-inline-text\n    [control]=\"inputControl\"\n    [placeholder]=\"placeholder() || lbl || ''\"\n    [clearable]=\"!required()\"\n    [autoId]=\"autoId()\"\n    [state]=\"formControl.invalid && formControl.touched ? 'error' : 'auto'\"\n    (sdFocus)=\"onFocus()\"\n    (sdBlur)=\"onBlur()\"\n    (keyupEnter)=\"onKeyupEnter()\"\n    (sdKeydown)=\"onKeydown($event)\"\n    (sdPaste)=\"onPaste($event)\"\n    (sdCompositionStart)=\"onCompositionStart($event)\"\n    (sdCompositionEnd)=\"onCompositionEnd($event)\"\n    (cleared)=\"cleared.emit()\">\n  </sd-inline-text>\n} @else {\n  @if (!app) {\n    <ng-content select=\"[sdLabel]\">\n      @if (lbl) {\n        <sd-label [label]=\"lbl\" [required]=\"required()\"></sd-label>\n      }\n    </ng-content>\n  }\n\n  <div\n    class=\"d-flex align-items-center\"\n    [class.c-focused]=\"isFocused\"\n    [class.c-disabled]=\"formControl.disabled\"\n    (click)=\"onClick()\"\n    aria-hidden=\"true\">\n      <mat-form-field\n        [class.sd-md]=\"size() === 'md'\"\n        [class.sd-sm]=\"size() === 'sm'\"\n        [class.hide-inline-error]=\"hideErr\"\n        [appearance]=\"app!\"\n        [floatLabel]=\"floatLabel()\">\n        @if (app && lbl) {\n          <mat-label style=\"display: inline-block\">\n            <div style=\"display: flex; align-items: center; gap: 4px\">\n              <span>{{ lbl }}</span>\n              @if (hText) {\n                <mat-icon [matTooltip]=\"hText\" matTooltipPosition=\"below\">info_outline</mat-icon>\n              }\n            </div>\n          </mat-label>\n        }\n\n        <input\n          aria-hidden=\"true\"\n          [id]=\"id\"\n          [formControl]=\"inputControl\"\n          #control\n          matInput\n          [placeholder]=\"placeholder() || lbl || ''\"\n          [errorStateMatcher]=\"matcher\"\n          (keyup.enter)=\"onKeyupEnter()\"\n          (focus)=\"onFocus()\"\n          (blur)=\"onBlur()\"\n          (keydown)=\"onKeydown($event)\"\n          (compositionstart)=\"onCompositionStart($event)\"\n          (compositionend)=\"onCompositionEnd($event)\"\n          [required]=\"required()\"\n          [readonly]=\"readonly()\"\n          [autocomplete]=\"id\"\n          (paste)=\"onPaste($event)\"\n          autocorrect=\"off\"\n          [attr.data-autoId]=\"autoId()\"\n          [attr.data-disabled]=\"dataDisabled()\"\n          [attr.data-invalid]=\"dataInvalid()\"\n          [attr.data-empty]=\"dataEmpty()\"\n          [attr.data-value]=\"dataValue()\"\n          [attr.data-required]=\"dataRequired()\"\n          [attr.data-error-message]=\"dataErrorMessage()\" />\n\n        @if (!hideErr && errMsg && formControl.touched) {\n          <mat-error>{{ errMsg }}</mat-error>\n        }\n\n        <!-- why: n\u00FAt clear render TR\u01AF\u1EDAC error icon. Clear hover-gated (visibility:hidden) v\u1EABn\n             chi\u1EBFm ch\u1ED7 trong layout \u2192 n\u1EBFu \u0111\u1EE9ng sau s\u1EBD \u0111\u1EA9y error icon \"t\u1EE5t v\u00E0o trong\". \u0110\u1EE9ng tr\u01B0\u1EDBc\n             th\u00EC error icon n\u1EB1m s\u00E1t m\u00E9p ph\u1EA3i, clear gi\u1EEF slot v\u00F4 h\u00ECnh b\u00EAn tr\u00E1i. -->\n        @if (showClear()) {\n          <button type=\"button\" class=\"sd-clear-btn sd-hover\" matSuffix (click)=\"clear($event)\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\n            <mat-icon>close</mat-icon>\n          </button>\n        }\n\n        @if (hideErr && errMsg && formControl.touched) {\n          <mat-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"errMsg\" matTooltipPosition=\"above\"> error </mat-icon>\n        }\n\n        @if (sdSuffixDef()?.templateRef; as suffixRef) {\n          <ng-container matSuffix>\n            <ng-container [ngTemplateOutlet]=\"suffixRef\"></ng-container>\n          </ng-container>\n        }\n        <!-- <ng-container matSuffix>\n          <ng-content select=\"[sdSuffix]\"></ng-content>\n        </ng-container> -->\n      </mat-form-field>\n  </div>\n}\n", styles: [".text-primary{color:var(--sd-primary)!important}.bg-primary{background:var(--sd-primary)!important}.border-primary{border-color:var(--sd-primary)!important}.text-primary-light{color:var(--sd-primary-light)!important}.bg-primary-light{background:var(--sd-primary-light)!important}.border-primary-light{border-color:var(--sd-primary-light)!important}.text-primary-dark{color:var(--sd-primary-dark)!important}.bg-primary-dark{background:var(--sd-primary-dark)!important}.border-primary-dark{border-color:var(--sd-primary-dark)!important}.text-info{color:var(--sd-info)!important}.bg-info{background:var(--sd-info)!important}.border-info{border-color:var(--sd-info)!important}.text-info-light{color:var(--sd-info-light)!important}.bg-info-light{background:var(--sd-info-light)!important}.border-info-light{border-color:var(--sd-info-light)!important}.text-info-dark{color:var(--sd-info-dark)!important}.bg-info-dark{background:var(--sd-info-dark)!important}.border-info-dark{border-color:var(--sd-info-dark)!important}.text-success{color:var(--sd-success)!important}.bg-success{background:var(--sd-success)!important}.border-success{border-color:var(--sd-success)!important}.text-success-light{color:var(--sd-success-light)!important}.bg-success-light{background:var(--sd-success-light)!important}.border-success-light{border-color:var(--sd-success-light)!important}.text-success-dark{color:var(--sd-success-dark)!important}.bg-success-dark{background:var(--sd-success-dark)!important}.border-success-dark{border-color:var(--sd-success-dark)!important}.text-warning{color:var(--sd-warning)!important}.bg-warning{background:var(--sd-warning)!important}.border-warning{border-color:var(--sd-warning)!important}.text-warning-light{color:var(--sd-warning-light)!important}.bg-warning-light{background:var(--sd-warning-light)!important}.border-warning-light{border-color:var(--sd-warning-light)!important}.text-warning-dark{color:var(--sd-warning-dark)!important}.bg-warning-dark{background:var(--sd-warning-dark)!important}.border-warning-dark{border-color:var(--sd-warning-dark)!important}.text-error{color:var(--sd-error)!important}.bg-error{background:var(--sd-error)!important}.border-error{border-color:var(--sd-error)!important}.text-error-light{color:var(--sd-error-light)!important}.bg-error-light{background:var(--sd-error-light)!important}.border-error-light{border-color:var(--sd-error-light)!important}.text-error-dark{color:var(--sd-error-dark)!important}.bg-error-dark{background:var(--sd-error-dark)!important}.border-error-dark{border-color:var(--sd-error-dark)!important}.text-secondary{color:var(--sd-secondary)!important}.bg-secondary{background:var(--sd-secondary)!important}.border-secondary{border-color:var(--sd-secondary)!important}.text-secondary-light{color:var(--sd-secondary-light)!important}.bg-secondary-light{background:var(--sd-secondary-light)!important}.border-secondary-light{border-color:var(--sd-secondary-light)!important}.text-secondary-dark{color:var(--sd-secondary-dark)!important}.bg-secondary-dark{background:var(--sd-secondary-dark)!important}.border-secondary-dark{border-color:var(--sd-secondary-dark)!important}.text-light{color:var(--sd-light)!important}.bg-light{background:var(--sd-light)!important}.border-light{border-color:var(--sd-light)!important}.text-dark{color:var(--sd-dark)!important}.bg-dark{background:var(--sd-dark)!important}.border-dark{border-color:var(--sd-dark)!important}.text-black500{color:var(--sd-black500)!important}.bg-black500{background:var(--sd-black500)!important}.border-black500{border-color:var(--sd-black500)!important}.text-black400{color:var(--sd-black400)!important}.bg-black400{background:var(--sd-black400)!important}.border-black400{border-color:var(--sd-black400)!important}.text-black300{color:var(--sd-black300)!important}.bg-black300{background:var(--sd-black300)!important}.border-black300{border-color:var(--sd-black300)!important}.text-black200{color:var(--sd-black200)!important}.bg-black200{background:var(--sd-black200)!important}.border-black200{border-color:var(--sd-black200)!important}.text-black100{color:var(--sd-black100)!important}.bg-black100{background:var(--sd-black100)!important}.border-black100{border-color:var(--sd-black100)!important}.text-white{color:#fff!important}.bg-white{background:#fff!important}.border-white{border-color:#fff!important}.text-black{color:#000!important}.bg-black{background:#000!important}.border-black{border-color:#000!important}:host{display:block}:host(.sd-has-label){padding-top:4px}:host(.sd-viewed){padding-top:0}:host ::ng-deep .mat-mdc-form-field.mat-form-field-appearance-outline.mat-form-field-disabled .mat-mdc-text-field-wrapper{background:var(--sd-black100)}:host ::ng-deep .mat-mdc-form-field input.mat-mdc-input-element:disabled{color:var(--sd-black400)!important}:host ::ng-deep .mat-mdc-form-field .mat-mdc-placeholder-required{color:var(--sd-error)}.sd-md:hover .btn-copy{visibility:visible}.btn-copy{visibility:hidden;background:#e9e9e9!important;line-height:26px!important;margin-bottom:3px;font-size:12px}\n"] }]
        }], ctorParameters: () => [], propDecorators: { control: [{ type: i0.ViewChild, args: ['control', { isSignal: true }] }], inlineRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SdInlineText), { isSignal: true }] }], sdLabelTemplate: [{ type: i0.ContentChild, args: ['sdLabel', { isSignal: true }] }], sdValueTemplate: [{ type: i0.ContentChild, args: ['sdValue', { isSignal: true }] }], sdViewDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdViewDefDirective), { isSignal: true }] }], sdSuffixDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdSuffixDefDirective), { isSignal: true }] }], autoIdInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoId", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], helperText: [{ type: i0.Input, args: [{ isSignal: true, alias: "helperText", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], hideInlineError: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideInlineError", required: false }] }], blurOnEnter: [{ type: i0.Input, args: [{ isSignal: true, alias: "blurOnEnter", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], viewed: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewed", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], precision: [{ type: i0.Input, args: [{ isSignal: true, alias: "precision", required: false }] }], format: [{ type: i0.Input, args: [{ isSignal: true, alias: "format", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], validator: [{ type: i0.Input, args: [{ isSignal: true, alias: "validator", required: false }] }], inlineError: [{ type: i0.Input, args: [{ isSignal: true, alias: "inlineError", required: false }] }], hyperlink: [{ type: i0.Input, args: [{ isSignal: true, alias: "hyperlink", required: false }] }], appearanceInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], floatLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatLabel", required: false }] }], valueModel: [{ type: i0.Input, args: [{ isSignal: true, alias: "model", required: false }] }, { type: i0.Output, args: ["modelChange"] }], sdChange: [{ type: i0.Output, args: ["sdChange"] }], sdFocus: [{ type: i0.Output, args: ["sdFocus"] }], sdBlur: [{ type: i0.Output, args: ["sdBlur"] }], keyupEnter: [{ type: i0.Output, args: ["keyupEnter"] }], cleared: [{ type: i0.Output, args: ["cleared"] }], sdFocusForceBlur: [{
                type: Output
            }] } });

/**
 * Generated bundle index. Do not edit.
 */

export { SdInputNumber };
//# sourceMappingURL=sdcorejs-angular-forms-input-number.mjs.map
