import * as i6 from '@angular/common';
import { CommonModule } from '@angular/common';
import * as i0 from '@angular/core';
import { viewChild, contentChild, inject, ChangeDetectorRef, input, computed, booleanAttribute, model, output, effect, untracked, ChangeDetectionStrategy, Component } from '@angular/core';
import * as i1 from '@angular/forms';
import { NgForm, FormGroup, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
import { provideDateFnsAdapter } from '@angular/material-date-fns-adapter';
import { MAT_DATE_LOCALE } from '@angular/material/core';
import * as i5 from '@angular/material/datepicker';
import { MatDatepicker, MatDatepickerModule } from '@angular/material/datepicker';
import { MatFormFieldModule } from '@angular/material/form-field';
import * as i3 from '@angular/material/icon';
import { MatIconModule } from '@angular/material/icon';
import * as i2 from '@angular/material/input';
import { MatInputModule } from '@angular/material/input';
import * as i4 from '@angular/material/tooltip';
import { MatTooltipModule } from '@angular/material/tooltip';
import { SdView } from '@sdcorejs/angular/components/view';
import { SdViewDefDirective, SdLabelDefDirective } from '@sdcorejs/angular/forms/directives';
import { SdLabel } from '@sdcorejs/angular/forms/label';
import { SD_FORM_CONFIGURATION, sdFormControlState, sdViewedTransform, sdViewedInline, SdFormControl, SdInlineErrorValidator } from '@sdcorejs/angular/forms/models';
import { sdIsEmpty, sdSerializeDataValue } from '@sdcorejs/angular/utilities/data-state';
import { I18nService } from '@sdcorejs/angular/i18n';
import { DateUtilities } from '@sdcorejs/angular/utilities/extensions';
import { BrowserUtilities } from '@sdcorejs/utils/fns';
import { parse } from 'date-fns';
import { enUS } from 'date-fns/locale';
import { Subscription } from 'rxjs';
import * as uuid from 'uuid';

/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @angular-eslint/no-input-rename */
class SdDate {
    id = `I${uuid.v4()}`;
    // ==========================================
    // 1. SIGNAL QUERIES
    // ==========================================
    inputRef = viewChild('input', ...(ngDevMode ? [{ debugName: "inputRef" }] : []));
    datePicker = viewChild(MatDatepicker, ...(ngDevMode ? [{ debugName: "datePicker" }] : []));
    sdLabelTemplate = contentChild('sdLabel', ...(ngDevMode ? [{ debugName: "sdLabelTemplate" }] : []));
    sdValueTemplate = contentChild('sdValue', ...(ngDevMode ? [{ debugName: "sdValueTemplate" }] : []));
    sdViewDef = contentChild(SdViewDefDirective, ...(ngDevMode ? [{ debugName: "sdViewDef" }] : []));
    sdLabelDef = contentChild(SdLabelDefDirective, ...(ngDevMode ? [{ debugName: "sdLabelDef" }] : []));
    // ==========================================
    // 2. INJECTS
    // ==========================================
    ref = inject(ChangeDetectorRef);
    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-date-${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 }]));
    required = input(false, ...(ngDevMode ? [{ debugName: "required", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
    disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
    /** Display mode: `false` edit · `true` static view · `'inline'` view + click-to-edit (calendar). */
    viewed = input(false, ...(ngDevMode ? [{ debugName: "viewed", transform: sdViewedTransform }] : [{ transform: sdViewedTransform }]));
    /** In `viewed='inline'`, show a hover clear-× on the text face. Set `false` when the host owns removal (chips). */
    clearable = input(true, ...(ngDevMode ? [{ debugName: "clearable", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
    // Tri-state `viewed` — shared primitive. In `'inline'` the calendar editor is always mounted
    // (chrome hidden via CSS); the sd-view text face opens the calendar on click.
    #viewedState = sdViewedInline(this.viewed, () => this.open(), this.disabled);
    /** `true` when `viewed === 'inline'`. */
    isInline = this.#viewedState.isInline;
    /** `true` when `viewed === true` (static view, no editor). */
    isViewed = this.#viewedState.isViewed;
    /** Open the calendar from the inline text face. No-op unless `viewed='inline'`. */
    enterInlineEdit = () => this.#viewedState.enterInlineEdit();
    /** View display template: `sdViewDef` overrides the projected `#sdValue` (unified). */
    viewTemplate = computed(() => this.sdViewDef()?.templateRef ?? this.sdValueTemplate(), ...(ngDevMode ? [{ debugName: "viewTemplate" }] : []));
    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.date.required');
        if (errors['matDatepickerMin']) {
            const d = this.resolvedMin();
            return this.#i18n.t('core.form.date.min-date', { date: d ? new Date(d).toLocaleDateString('vi-VN') : '' });
        }
        if (errors['matDatepickerMax']) {
            const d = this.resolvedMax();
            return this.#i18n.t('core.form.date.max-date', { date: d ? new Date(d).toLocaleDateString('vi-VN') : '' });
        }
        if (errors['matDatetimePickerParse'])
            return this.#i18n.t('core.form.date.parse-error', { text: errors['matDatetimePickerParse']?.text ?? '' });
        if (errors['date'])
            return errors['date'];
        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" }] : []));
    // Xử lý thông minh Gom min/minDate và max/maxDate
    minInput = input(undefined, ...(ngDevMode ? [{ debugName: "minInput", alias: 'min' }] : [{ alias: 'min' }]));
    minDateInput = input(undefined, ...(ngDevMode ? [{ debugName: "minDateInput", alias: 'minDate' }] : [{ alias: 'minDate' }]));
    resolvedMin = computed(() => this.#parseDateBoundary(this.minInput() ?? this.minDateInput()), ...(ngDevMode ? [{ debugName: "resolvedMin" }] : []));
    maxInput = input(undefined, ...(ngDevMode ? [{ debugName: "maxInput", alias: 'max' }] : [{ alias: 'max' }]));
    maxDateInput = input(undefined, ...(ngDevMode ? [{ debugName: "maxDateInput", alias: 'maxDate' }] : [{ alias: 'maxDate' }]));
    resolvedMax = computed(() => this.#parseDateBoundary(this.maxInput() ?? this.maxDateInput()), ...(ngDevMode ? [{ debugName: "resolvedMax" }] : []));
    valueModel = model(undefined, ...(ngDevMode ? [{ debugName: "valueModel", alias: 'model' }] : [{ alias: 'model' }]));
    // ==========================================
    // 4. SIGNAL OUTPUTS
    // ==========================================
    sdChange = output();
    sdFocus = output();
    // ==========================================
    // 5. INTERNAL STATE & STREAMS
    // ==========================================
    isMobileOrTablet = BrowserUtilities.isMobile();
    formControl = new SdFormControl();
    isFocused = false;
    isValid;
    #date;
    #subscription = new Subscription();
    constructor() {
        // EFFECT 1: Sync model thay đổi từ bên ngoài (String/Date -> Date)
        // Material date-fns adapter dùng native Date làm internal type cho FormControl.
        effect(() => {
            let val = this.valueModel();
            untracked(() => {
                if (!DateUtilities.isDate(val)) {
                    val = null;
                }
                val = DateUtilities.toFormat(val, 'yyyy/MM/dd');
                if (this.#date !== val) {
                    this.#date = val;
                    const dateObj = DateUtilities.isDate(this.#date)
                        ? parse(DateUtilities.toFormat(this.#date, 'yyyy/MM/dd'), 'yyyy/MM/dd', new Date())
                        : null;
                    this.formControl.setValue(dateObj, { emitEvent: false });
                }
            });
        });
        // EFFECT 2: Sync Disable
        effect(() => {
            if (this.disabled())
                this.formControl.disable({ emitEvent: false });
            else
                this.formControl.enable({ emitEvent: false });
        });
        // EFFECT 3: Update Validators
        effect(() => {
            const req = this.required();
            const inl = this.inlineError();
            untracked(() => {
                const validators = [];
                if (req)
                    validators.push(Validators.required);
                if (inl)
                    validators.push(SdInlineErrorValidator);
                this.formControl.setValidators(validators.length ? validators : null);
                this.formControl.updateValueAndValidity({ emitEvent: false });
            });
        });
    }
    ngOnInit() {
        this.#subscription.add(this.formControl.sdChanges.subscribe(() => {
            this.ref.markForCheck();
        }));
        const formGroup = this.form();
        formGroup?.addControl(this.name(), this.formControl);
    }
    ngOnDestroy() {
        const formGroup = this.form();
        formGroup?.removeControl(this.name());
        this.#subscription.unsubscribe();
    }
    // Hàm private tái sử dụng cho parse Min/Max Date
    #parseDateBoundary(val) {
        if (val === 'TODAY')
            return new Date();
        if (val && DateUtilities.isDate(val))
            return new Date(val);
        return null;
    }
    onFocus = () => {
        this.isFocused = true;
        this.sdFocus.emit();
    };
    onBlur = () => {
        this.isFocused = false;
    };
    onClick = () => {
        if (this.sdViewDef()?.templateRef) {
            if (!this.formControl.disabled && !this.isFocused) {
                this.focus();
            }
        }
    };
    blur = () => {
        this.inputRef()?.nativeElement?.blur();
    };
    focus = () => {
        this.isFocused = true;
        setTimeout(() => {
            this.inputRef()?.nativeElement?.focus();
            this.datePicker()?.open();
        }, 100);
    };
    /** Open the datepicker calendar programmatically (anchors to the field input). */
    open = () => {
        if (this.formControl.disabled)
            return;
        this.datePicker()?.open();
    };
    focusInputElement() {
        this.inputRef()?.nativeElement?.focus();
    }
    onKeyDown = (event) => {
        const key = event.keyCode || event.charCode;
        const isShift = key === 16;
        if (event.ctrlKey && (key === 67 || key === 86))
            return true;
        if (((key >= 48 && key <= 57) ||
            key === 8 ||
            key <= 37 ||
            key <= 39 ||
            (key >= 96 && key <= 105) ||
            key === 191 ||
            key === 186 ||
            key === 59) &&
            !isShift) {
            return true;
        }
        return false;
    };
    onKeyup = (event) => {
        const currentVal = event.target.value;
        const formControl = this.formControl;
        const regex = /^([1-9]|([012][0-9])|(3[01]))\/([0]{0,1}[1-9]|1[012])\/\d\d\d\d$/g;
        if (currentVal && !regex.test(currentVal)) {
            setTimeout(() => {
                this.isValid = true;
                formControl.markAsDirty();
                formControl.markAsTouched();
                formControl.setErrors({ ...formControl.errors, date: this.#i18n.t('core.form.date.invalid-format') });
            }, 0);
        }
        else {
            setTimeout(() => {
                this.isValid = false;
                formControl.setErrors({ ...formControl.errors, date: null });
                this.formControl.updateValueAndValidity();
            }, 0);
        }
    };
    onChange = (event) => {
        // event.value giờ là native Date (date-fns adapter), không cần .toDate() như Moment.
        const value = DateUtilities.toFormat(event.value, 'yyyy/MM/dd');
        this.inputRef()?.nativeElement?.focus();
        if (!this.isValid) {
            if (this.#date !== value) {
                this.valueModel.set(value);
                this.sdChange.emit(value);
            }
        }
        else {
            this.isValid = false;
            this.formControl.setValue(null);
            this.valueModel.set(null);
            this.sdChange.emit(null);
        }
    };
    clear = ($event) => {
        $event?.stopPropagation();
        if (this.formControl.value) {
            this.formControl.setValue(null);
            this.valueModel.set(null);
            this.sdChange.emit(null);
        }
    };
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: SdDate, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.24", type: SdDate, isStandalone: true, selector: "sd-date", 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 }, required: { classPropertyName: "required", publicName: "required", 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 }, clearable: { classPropertyName: "clearable", publicName: "clearable", 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 }, minInput: { classPropertyName: "minInput", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, minDateInput: { classPropertyName: "minDateInput", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxInput: { classPropertyName: "maxInput", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, maxDateInput: { classPropertyName: "maxDateInput", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, valueModel: { classPropertyName: "valueModel", publicName: "model", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueModel: "modelChange", sdChange: "sdChange", sdFocus: "sdFocus" }, host: { properties: { "class.sd-bare": "isInline()", "class.sd-viewed": "isViewed() || isInline()", "class.sd-has-label": "!!label()" } }, providers: [
            // DateFnsAdapter inject MAT_DATE_LOCALE; nếu undefined sẽ throw khi format/parse.
            // Provide locale en-US tại scope component để hành vi giống Moment cũ (English default).
            { provide: MAT_DATE_LOCALE, useValue: enUS },
            provideDateFnsAdapter({
                parse: { dateInput: 'dd/MM/yyyy' },
                display: {
                    dateInput: 'dd/MM/yyyy',
                    monthYearLabel: 'MMM yyyy',
                    dateA11yLabel: 'PP',
                    monthYearA11yLabel: 'MMMM yyyy',
                },
            }),
        ], 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: "sdLabelDef", first: true, predicate: SdLabelDefDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["input"], descendants: true, isSignal: true }, { propertyName: "datePicker", first: true, predicate: MatDatepicker, 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 req = required();\n@let _isInline = isInline();\n@let _bare = _isInline;\n@let _hasValue = !!formControl.value;\n\n@let minD = resolvedMin();\n@let maxD = resolvedMax();\n\n@if (isViewed()) {\n  <sd-view\n    [label]=\"lbl\"\n    [labelTemplate]=\"sdLabelTemplate()\"\n    [value]=\"formControl.value\"\n    [display]=\"formControl.value | date: 'dd/MM/yyyy'\"\n    [hyperlink]=\"hyperlink()\"\n    [valueTemplate]=\"viewTemplate()\">\n  </sd-view>\n} @else {\n  @if (_isInline) {\n    <!-- why: inline \u2014 sd-view l\u00E0 \"m\u1EB7t\" + trigger; calendar editor render \u1EA9n (.sd-inline-editor) ch\u1EC9 \u0111\u1EC3 m\u1EDF panel. -->\n    <span class=\"sd-inline-view\" role=\"button\" tabindex=\"0\" (click)=\"enterInlineEdit()\" (keydown.enter)=\"enterInlineEdit()\">\n      <sd-view\n        [label]=\"lbl\"\n        [labelTemplate]=\"sdLabelTemplate()\"\n        [value]=\"formControl.value\"\n        [display]=\"formControl.value | date: 'dd/MM/yyyy'\"\n        [hyperlink]=\"hyperlink()\"\n        [valueTemplate]=\"viewTemplate()\">\n      </sd-view>\n      @if (clearable() && _hasValue && !req && !formControl.disabled) {\n        <button type=\"button\" class=\"sd-inline-clear\" (click)=\"clear($event)\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\n          <mat-icon>close</mat-icon>\n        </button>\n      }\n    </span>\n  }\n  @if (!app) {\n    <ng-content select=\"[sdLabel]\">\n      @if (lbl) {\n        <sd-label [label]=\"lbl\" [required]=\"req\"></sd-label>\n      }\n    </ng-content>\n  }\n\n  <div\n    class=\"d-flex align-items-center\"\n    [class.sd-inline-editor]=\"_isInline\"\n    [class.c-focused]=\"isFocused\"\n    [class.c-disabled]=\"formControl.disabled\"\n    (click)=\"onClick()\"\n    aria-hidden=\"true\">\n      <mat-form-field\n        class=\"c-form-field-date-input\"\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          matInput\n          (keyup)=\"onKeyup($event)\"\n          (keydown)=\"onKeyDown($event)\"\n          (dateChange)=\"onChange($event)\"\n          [autocomplete]=\"id\"\n          autocorrect=\"off\"\n          [formControl]=\"formControl\"\n          [required]=\"req\"\n          [matDatepicker]=\"picker\"\n          [placeholder]=\"placeholder() || lbl || ''\"\n          [min]=\"minD\"\n          [max]=\"maxD\"\n          (focus)=\"onFocus()\"\n          (blur)=\"onBlur()\"\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          #input\n          [maxLength]=\"10\" />\n\n        <mat-datepicker #picker [touchUi]=\"isMobileOrTablet\"></mat-datepicker>\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 (!hideErr && errMsg && formControl.touched) {\n          <mat-error>{{ errMsg }}</mat-error>\n        }\n\n        @if (formControl.value && !req && !formControl.disabled && !_bare) {\n          <button\n            type=\"button\"\n            class=\"sd-clear-btn sd-hover\"\n            matSuffix\n            (click)=\"clear($event)\"\n            title=\"X\u00F3a\"\n            aria-label=\"X\u00F3a\">\n            <mat-icon>close</mat-icon>\n          </button>\n        }\n\n        <mat-icon class=\"cursor-pointer sd-suffix-icon\" (click)=\"!formControl.disabled && picker.open()\" #btn matSuffix>today</mat-icon>\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)}:host ::ng-deep .mat-mdc-form-field-icon-suffix{display:flex}:host(.sd-bare){position:relative}.sd-inline-view{cursor:pointer;display:inline-flex;align-items:center;width:100%;padding:1px 6px;border-radius:4px;background-color:#0000000a;transition:background-color .15s ease}.sd-inline-view:hover{background-color:#00000014}.sd-inline-view .sd-inline-clear{display:none;align-items:center;margin-left:4px;padding:0;border:0;background:transparent;cursor:pointer;line-height:0;color:var(--sd-text-secondary, #6b7280);transition:color .15s ease}.sd-inline-view .sd-inline-clear mat-icon{font-size:16px;width:16px;height:16px}.sd-inline-view .sd-inline-clear:hover{color:var(--sd-error, #b32626)}.sd-inline-view:hover .sd-inline-clear{display:inline-flex}.sd-inline-editor{position:absolute;inset:0;opacity:0;pointer-events:none}.sd-inline-editor ::ng-deep *{pointer-events:none!important}:host(.sd-bare){display:inline-flex;align-items:center}:host(.sd-bare) ::ng-deep .mat-mdc-form-field{width:auto}:host(.sd-bare) ::ng-deep .mat-mdc-text-field-wrapper{padding:0;background:transparent}:host(.sd-bare) ::ng-deep .mat-mdc-form-field-flex{padding:0;align-items:center}:host(.sd-bare) ::ng-deep .mdc-notched-outline{display:none}:host(.sd-bare) ::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none}:host(.sd-bare) ::ng-deep .mat-mdc-form-field-infix{padding:0;min-height:0;width:auto;border:0;display:inline-flex;align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.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: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.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: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i5.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i5.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { 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: "pipe", type: i6.DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: SdDate, decorators: [{
            type: Component,
            args: [{ selector: 'sd-date', changeDetection: ChangeDetectionStrategy.OnPush, host: { '[class.sd-bare]': 'isInline()', '[class.sd-viewed]': 'isViewed() || isInline()', '[class.sd-has-label]': '!!label()' }, providers: [
                        // DateFnsAdapter inject MAT_DATE_LOCALE; nếu undefined sẽ throw khi format/parse.
                        // Provide locale en-US tại scope component để hành vi giống Moment cũ (English default).
                        { provide: MAT_DATE_LOCALE, useValue: enUS },
                        provideDateFnsAdapter({
                            parse: { dateInput: 'dd/MM/yyyy' },
                            display: {
                                dateInput: 'dd/MM/yyyy',
                                monthYearLabel: 'MMM yyyy',
                                dateA11yLabel: 'PP',
                                monthYearA11yLabel: 'MMMM yyyy',
                            },
                        }),
                    ], standalone: true, imports: [
                        CommonModule,
                        FormsModule,
                        ReactiveFormsModule,
                        MatInputModule,
                        MatIconModule,
                        MatTooltipModule,
                        MatFormFieldModule,
                        MatDatepickerModule,
                        SdLabel,
                        SdView
                    ], template: "@let lbl = label();\n@let app = appearance();\n@let hideErr = hideInlineError();\n@let errMsg = errorMessage();\n@let hText = helperText();\n@let req = required();\n@let _isInline = isInline();\n@let _bare = _isInline;\n@let _hasValue = !!formControl.value;\n\n@let minD = resolvedMin();\n@let maxD = resolvedMax();\n\n@if (isViewed()) {\n  <sd-view\n    [label]=\"lbl\"\n    [labelTemplate]=\"sdLabelTemplate()\"\n    [value]=\"formControl.value\"\n    [display]=\"formControl.value | date: 'dd/MM/yyyy'\"\n    [hyperlink]=\"hyperlink()\"\n    [valueTemplate]=\"viewTemplate()\">\n  </sd-view>\n} @else {\n  @if (_isInline) {\n    <!-- why: inline \u2014 sd-view l\u00E0 \"m\u1EB7t\" + trigger; calendar editor render \u1EA9n (.sd-inline-editor) ch\u1EC9 \u0111\u1EC3 m\u1EDF panel. -->\n    <span class=\"sd-inline-view\" role=\"button\" tabindex=\"0\" (click)=\"enterInlineEdit()\" (keydown.enter)=\"enterInlineEdit()\">\n      <sd-view\n        [label]=\"lbl\"\n        [labelTemplate]=\"sdLabelTemplate()\"\n        [value]=\"formControl.value\"\n        [display]=\"formControl.value | date: 'dd/MM/yyyy'\"\n        [hyperlink]=\"hyperlink()\"\n        [valueTemplate]=\"viewTemplate()\">\n      </sd-view>\n      @if (clearable() && _hasValue && !req && !formControl.disabled) {\n        <button type=\"button\" class=\"sd-inline-clear\" (click)=\"clear($event)\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\n          <mat-icon>close</mat-icon>\n        </button>\n      }\n    </span>\n  }\n  @if (!app) {\n    <ng-content select=\"[sdLabel]\">\n      @if (lbl) {\n        <sd-label [label]=\"lbl\" [required]=\"req\"></sd-label>\n      }\n    </ng-content>\n  }\n\n  <div\n    class=\"d-flex align-items-center\"\n    [class.sd-inline-editor]=\"_isInline\"\n    [class.c-focused]=\"isFocused\"\n    [class.c-disabled]=\"formControl.disabled\"\n    (click)=\"onClick()\"\n    aria-hidden=\"true\">\n      <mat-form-field\n        class=\"c-form-field-date-input\"\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          matInput\n          (keyup)=\"onKeyup($event)\"\n          (keydown)=\"onKeyDown($event)\"\n          (dateChange)=\"onChange($event)\"\n          [autocomplete]=\"id\"\n          autocorrect=\"off\"\n          [formControl]=\"formControl\"\n          [required]=\"req\"\n          [matDatepicker]=\"picker\"\n          [placeholder]=\"placeholder() || lbl || ''\"\n          [min]=\"minD\"\n          [max]=\"maxD\"\n          (focus)=\"onFocus()\"\n          (blur)=\"onBlur()\"\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          #input\n          [maxLength]=\"10\" />\n\n        <mat-datepicker #picker [touchUi]=\"isMobileOrTablet\"></mat-datepicker>\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 (!hideErr && errMsg && formControl.touched) {\n          <mat-error>{{ errMsg }}</mat-error>\n        }\n\n        @if (formControl.value && !req && !formControl.disabled && !_bare) {\n          <button\n            type=\"button\"\n            class=\"sd-clear-btn sd-hover\"\n            matSuffix\n            (click)=\"clear($event)\"\n            title=\"X\u00F3a\"\n            aria-label=\"X\u00F3a\">\n            <mat-icon>close</mat-icon>\n          </button>\n        }\n\n        <mat-icon class=\"cursor-pointer sd-suffix-icon\" (click)=\"!formControl.disabled && picker.open()\" #btn matSuffix>today</mat-icon>\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)}:host ::ng-deep .mat-mdc-form-field-icon-suffix{display:flex}:host(.sd-bare){position:relative}.sd-inline-view{cursor:pointer;display:inline-flex;align-items:center;width:100%;padding:1px 6px;border-radius:4px;background-color:#0000000a;transition:background-color .15s ease}.sd-inline-view:hover{background-color:#00000014}.sd-inline-view .sd-inline-clear{display:none;align-items:center;margin-left:4px;padding:0;border:0;background:transparent;cursor:pointer;line-height:0;color:var(--sd-text-secondary, #6b7280);transition:color .15s ease}.sd-inline-view .sd-inline-clear mat-icon{font-size:16px;width:16px;height:16px}.sd-inline-view .sd-inline-clear:hover{color:var(--sd-error, #b32626)}.sd-inline-view:hover .sd-inline-clear{display:inline-flex}.sd-inline-editor{position:absolute;inset:0;opacity:0;pointer-events:none}.sd-inline-editor ::ng-deep *{pointer-events:none!important}:host(.sd-bare){display:inline-flex;align-items:center}:host(.sd-bare) ::ng-deep .mat-mdc-form-field{width:auto}:host(.sd-bare) ::ng-deep .mat-mdc-text-field-wrapper{padding:0;background:transparent}:host(.sd-bare) ::ng-deep .mat-mdc-form-field-flex{padding:0;align-items:center}:host(.sd-bare) ::ng-deep .mdc-notched-outline{display:none}:host(.sd-bare) ::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none}:host(.sd-bare) ::ng-deep .mat-mdc-form-field-infix{padding:0;min-height:0;width:auto;border:0;display:inline-flex;align-items:center}\n"] }]
        }], ctorParameters: () => [], propDecorators: { inputRef: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }], datePicker: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatDatepicker), { 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 }] }], sdLabelDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdLabelDefDirective), { 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 }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], viewed: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewed", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", 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 }] }], minInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], minDateInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], maxDateInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", 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"] }] } });

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

export { SdDate };
//# sourceMappingURL=sdcorejs-angular-forms-date.mjs.map
