import * as i1 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 i2 from '@angular/forms';
import { NgForm, FormGroup, FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
import { provideDateFnsAdapter } from '@angular/material-date-fns-adapter';
import { MatNativeDateModule, MAT_DATE_LOCALE } from '@angular/material/core';
import * as i6 from '@angular/material/datepicker';
import { MatDateRangePicker, MatDatepickerModule } from '@angular/material/datepicker';
import * as i5 from '@angular/material/form-field';
import { MatFormFieldModule } from '@angular/material/form-field';
import * as i3 from '@angular/material/icon';
import { MatIconModule } from '@angular/material/icon';
import * as i4 from '@angular/material/tooltip';
import { MatTooltipModule } from '@angular/material/tooltip';
import { SdLabelDefDirective } from '@sdcorejs/angular/forms/directives';
import { SD_FORM_CONFIGURATION, sdFormControlState, sdViewedTransform, sdViewedInline } from '@sdcorejs/angular/forms/models';
import { sdSerializeDataValue } from '@sdcorejs/angular/utilities/data-state';
import { SdLabel } from '@sdcorejs/angular/forms/label';
import { SdView } from '@sdcorejs/angular/components/view';
import { I18nService, TranslatePipe } 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 * as uuid from 'uuid';

/* eslint-disable @angular-eslint/no-input-rename */
/* eslint-disable @typescript-eslint/no-explicit-any */
class SdDateRange {
    id1 = `I${uuid.v4()}`;
    id2 = `I${uuid.v4()}`;
    #c1 = uuid.v4();
    #c2 = uuid.v4();
    // ==========================================
    // 1. SIGNAL QUERIES
    // ==========================================
    picker = viewChild(MatDateRangePicker, ...(ngDevMode ? [{ debugName: "picker" }] : []));
    sdLabelDef = contentChild(SdLabelDefDirective, ...(ngDevMode ? [{ debugName: "sdLabelDef" }] : []));
    // ==========================================
    // 2. INJECTS
    // ==========================================
    cdRef = 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-range-${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(() => {
        const v = this.#state().value;
        const empty = !v || !v.from || !v.to;
        return empty ? '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" }] : []));
    hideInlineError = input(false, ...(ngDevMode ? [{ debugName: "hideInlineError", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
    /**
     * Tổng hợp error message để hiển thị trong tooltip khi hideInlineError = true.
     */
    errorMessage = computed(() => {
        void this.#state();
        const outerErrors = this.formControl.errors;
        const c1Errors = this.control1?.errors;
        const c2Errors = this.control2?.errors;
        if (outerErrors?.['required'] || c1Errors?.['required'] || c2Errors?.['required']) {
            return this.#i18n.t('core.form.date-range.required');
        }
        if (outerErrors?.['matDatepickerMin'] || c1Errors?.['matDatepickerMin']) {
            return this.#i18n.t('core.form.date-range.invalid-min');
        }
        if (outerErrors?.['matDatepickerMax'] || c2Errors?.['matDatepickerMax']) {
            return this.#i18n.t('core.form.date-range.invalid-max');
        }
        return undefined;
    }, ...(ngDevMode ? [{ debugName: "errorMessage" }] : []));
    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 (range picker). */
    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 range editor is always mounted
    // (chrome hidden via CSS); the sd-view text face opens the range picker 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 range picker from the inline text face. No-op unless `viewed='inline'`. */
    enterInlineEdit = () => this.#viewedState.enterInlineEdit();
    /** Optional <ng-template #sdValue> projected by consumer to override the viewed text. */
    sdValueTemplate = contentChild('sdValue', ...(ngDevMode ? [{ debugName: "sdValueTemplate" }] : []));
    /**
     * Formatted "dd/MM/yyyy → dd/MM/yyyy" string for the viewed-mode display.
     * why: viewed mode chỉ hiển thị text — cần format gọn cho cả 2 đầu range,
     * Returns empty when both ends are blank, "from →" when only from is set, and so on.
     */
    formatted = computed(() => {
        const m = this.valueModel();
        const fmt = (d) => {
            if (d == null || d === '')
                return '';
            const dt = d instanceof Date ? d : new Date(String(d));
            if (isNaN(dt.getTime()))
                return '';
            const dd = String(dt.getDate()).padStart(2, '0');
            const mm = String(dt.getMonth() + 1).padStart(2, '0');
            return `${dd}/${mm}/${dt.getFullYear()}`;
        };
        const a = fmt(m?.from);
        const b = fmt(m?.to);
        if (!a && !b)
            return '';
        return `${a} → ${b}`;
    }, ...(ngDevMode ? [{ debugName: "formatted" }] : []));
    /** Open the range picker panel programmatically (for query-bar chip auto-open). */
    open = () => {
        if (this.formControl.disabled)
            return;
        this.picker()?.open();
    };
    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" }] : []));
    minInput = input(undefined, ...(ngDevMode ? [{ debugName: "minInput", alias: 'min' }] : [{ alias: 'min' }]));
    resolvedMin = computed(() => this.#parseDateBoundary(this.minInput()), ...(ngDevMode ? [{ debugName: "resolvedMin" }] : []));
    maxInput = input(undefined, ...(ngDevMode ? [{ debugName: "maxInput", alias: 'max' }] : [{ alias: 'max' }]));
    resolvedMax = computed(() => this.#parseDateBoundary(this.maxInput()), ...(ngDevMode ? [{ debugName: "resolvedMax" }] : []));
    valueModel = model(undefined, ...(ngDevMode ? [{ debugName: "valueModel", alias: 'model' }] : [{ alias: 'model' }]));
    // ==========================================
    // 4. SIGNAL OUTPUTS
    // ==========================================
    sdChange = output();
    // ==========================================
    // 5. INTERNAL STATE & STREAMS
    // ==========================================
    isMobileOrTablet = BrowserUtilities.isMobile();
    formControl = new FormControl();
    control1 = new FormControl();
    control2 = new FormControl();
    #isFocus = false;
    #isModelChange = false;
    #isSdChangeEmittedByEnter = false;
    #isSdChangeEmittedByClear = false;
    constructor() {
        this.cdRef.markForCheck();
        // EFFECT 1: Sync model thay đổi từ bên ngoài vào control1 và control2
        effect(() => {
            const val = this.valueModel();
            untracked(() => {
                const fromStr = DateUtilities.isDate(val?.from) ? DateUtilities.toFormat(val?.from, 'yyyy/MM/dd') : null;
                const toStr = DateUtilities.isDate(val?.to) ? DateUtilities.toFormat(val?.to, 'yyyy/MM/dd') : null;
                // Chỉ set value nếu có sự khác biệt (tránh loop)
                // control1/control2 giờ giữ native Date (date-fns adapter), không cần .toDate() như Moment.
                const currentFrom = this.control1.value ? DateUtilities.toFormat(this.control1.value, 'yyyy/MM/dd') : null;
                const currentTo = this.control2.value ? DateUtilities.toFormat(this.control2.value, 'yyyy/MM/dd') : null;
                if (fromStr !== currentFrom) {
                    this.control1.setValue(fromStr ? parse(fromStr, 'yyyy/MM/dd', new Date()) : null, { emitEvent: false });
                }
                if (toStr !== currentTo) {
                    this.control2.setValue(toStr ? parse(toStr, 'yyyy/MM/dd', new Date()) : null, { emitEvent: false });
                }
                // Đồng bộ control tổng để required của form cha không bị invalid khi model default đã có giá trị.
                this.formControl.setValue({ from: this.control1.value, to: this.control2.value }, { emitEvent: false });
                this.formControl.updateValueAndValidity({ emitEvent: false });
            });
        });
        // EFFECT 2: Sync Disable
        effect(() => {
            if (this.disabled()) {
                this.formControl.disable({ emitEvent: false });
                this.control1.disable({ emitEvent: false });
                this.control2.disable({ emitEvent: false });
            }
            else {
                this.formControl.enable({ emitEvent: false });
                this.control1.enable({ emitEvent: false });
                this.control2.enable({ emitEvent: false });
            }
        });
        // EFFECT 3: Sync Required
        effect(() => {
            const isReq = this.required();
            untracked(() => {
                if (isReq) {
                    this.formControl.setValidators([Validators.required]);
                    this.control1.setValidators([Validators.required]);
                    this.control2.setValidators([Validators.required]);
                }
                else {
                    this.formControl.clearValidators();
                    this.control1.clearValidators();
                    this.control2.clearValidators();
                }
                this.formControl.updateValueAndValidity({ emitEvent: false });
                this.control1.updateValueAndValidity({ emitEvent: false });
                this.control2.updateValueAndValidity({ emitEvent: false });
            });
        });
    }
    ngOnInit() {
        const formGroup = this.form();
        formGroup?.addControl(this.#c1, this.control1);
        formGroup?.addControl(this.#c2, this.control2);
        formGroup?.addControl(this.name(), this.formControl);
    }
    ngOnDestroy() {
        const formGroup = this.form();
        formGroup?.removeControl(this.#c1);
        formGroup?.removeControl(this.#c2);
        formGroup?.removeControl(this.name());
    }
    #parseDateBoundary(val) {
        if (val === 'TODAY')
            return new Date();
        if (val && DateUtilities.isDate(val))
            return new Date(val);
        return null;
    }
    onStartChange = (event) => {
        if (!this.#isFocus)
            this.#emit();
    };
    onEndChange = (event) => {
        if (!this.#isFocus)
            this.#emit();
    };
    #emit = () => {
        // control1/control2 giờ giữ native Date, không cần .toDate().
        const from = this.control1.value || null;
        const to = this.control2.value || null;
        const currentModel = this.valueModel();
        const newFrom = DateUtilities.isDate(from) ? DateUtilities.toFormat(from, 'yyyy/MM/dd') : null;
        const newTo = DateUtilities.isDate(to) ? DateUtilities.toFormat(to, 'yyyy/MM/dd') : null;
        if (newFrom !== currentModel?.from || newTo !== currentModel?.to) {
            const nextModel = { from: newFrom, to: newTo };
            this.formControl.setValue({ from: this.control1.value, to: this.control2.value }, { emitEvent: false });
            this.valueModel.set(nextModel);
            this.#isModelChange = true;
            this.cdRef.markForCheck();
        }
    };
    clear = () => {
        const emptyModel = { from: null, to: null };
        this.control1.setValue(null, { emitEvent: false });
        this.control2.setValue(null, { emitEvent: false });
        this.formControl.setValue(emptyModel, { emitEvent: false });
        this.valueModel.set(emptyModel);
        this.sdChange.emit(emptyModel);
        this.#isSdChangeEmittedByClear = true;
        this.cdRef.markForCheck();
    };
    onEnter = () => {
        this.#emit();
        this.sdChange.emit(this.valueModel());
        this.#isSdChangeEmittedByEnter = true;
    };
    onFocus = () => {
        this.#isFocus = true;
        this.#isModelChange = false;
        this.#isSdChangeEmittedByEnter = false;
        this.#isSdChangeEmittedByClear = false;
    };
    onBlur = () => {
        this.#isFocus = false;
        this.#emit();
        setTimeout(() => {
            if (!this.#isFocus && this.#isModelChange && !(this.#isSdChangeEmittedByEnter || this.#isSdChangeEmittedByClear)) {
                this.sdChange.emit(this.valueModel());
            }
        });
    };
    onClosePicker = () => {
        this.sdChange.emit(this.valueModel());
    };
    onOpenPicker = (event) => {
        event.stopPropagation();
        if (!this.formControl.disabled) {
            this.picker()?.open();
        }
    };
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: SdDateRange, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.24", type: SdDateRange, isStandalone: true, selector: "sd-date-range", 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 }, 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 }, 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 }, maxInput: { classPropertyName: "maxInput", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, valueModel: { classPropertyName: "valueModel", publicName: "model", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueModel: "modelChange", sdChange: "sdChange" }, host: { properties: { "class.sd-bare": "isInline()", "class.sd-viewed": "isViewed() || isInline()", "class.sd-has-label": "!!label()" } }, providers: [
            // DateFnsAdapter inject MAT_DATE_LOCALE; cấp default en-US để parse/format hoạt động.
            { 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: "sdLabelDef", first: true, predicate: SdLabelDefDirective, descendants: true, isSignal: true }, { propertyName: "sdValueTemplate", first: true, predicate: ["sdValue"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "picker", first: true, predicate: MatDateRangePicker, descendants: true, isSignal: true }], ngImport: i0, template: "@let lblDef = sdLabelDef();\n@let lbl = label();\n@let app = appearance();\n@let req = required();\n@let hideErr = hideInlineError();\n@let errMsg = errorMessage();\n@let hText = helperText();\n@let minD = resolvedMin();\n@let maxD = resolvedMax();\n@let sz = size();\n@let _isInline = isInline();\n@let _bare = _isInline;\n@let _hasValue = !!(control1.value || control2.value);\n\n@if (isViewed()) {\n  <sd-view\n    [label]=\"lbl\"\n    [labelTemplate]=\"lblDef?.templateRef ?? null\"\n    [value]=\"valueModel()\"\n    [display]=\"formatted()\"\n    [valueTemplate]=\"sdValueTemplate()\">\n  </sd-view>\n} @else {\n  @if (_isInline) {\n    <!-- why: inline \u2014 sd-view l\u00E0 \"m\u1EB7t\" + trigger; range editor render \u1EA9n (.sd-inline-editor) ch\u1EC9 \u0111\u1EC3 m\u1EDF picker. -->\n    <span class=\"sd-inline-view\" role=\"button\" tabindex=\"0\" (click)=\"enterInlineEdit()\" (keydown.enter)=\"enterInlineEdit()\">\n      <sd-view\n        [label]=\"lbl\"\n        [labelTemplate]=\"lblDef?.templateRef ?? null\"\n        [value]=\"valueModel()\"\n        [display]=\"formatted()\"\n        [valueTemplate]=\"sdValueTemplate()\">\n      </sd-view>\n      @if (clearable() && _hasValue && !req && !formControl.disabled) {\n        <button type=\"button\" class=\"sd-inline-clear\" (click)=\"$event.stopPropagation(); clear()\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\n          <mat-icon>close</mat-icon>\n        </button>\n      }\n    </span>\n  }\n\n  <div [class.sd-inline-editor]=\"_isInline\">\n@if (!app && lblDef?.templateRef) {\n  <ng-container *ngTemplateOutlet=\"lblDef!.templateRef\"> </ng-container>\n}\n@if (!app && lbl && !lblDef?.templateRef) {\n  <sd-label [label]=\"lbl\" [required]=\"req\"></sd-label>\n}\n\n<mat-form-field\n  [class.sd-md]=\"sz === 'md'\"\n  [class.sd-sm]=\"sz === '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  <mat-date-range-input [max]=\"maxD\" [min]=\"minD\" [rangePicker]=\"picker\" [disabled]=\"formControl.disabled\" [required]=\"req\"\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      aria-hidden=\"true\"\n      [id]=\"id1\"\n      autocomplete=\"off\"\n      autocorrect=\"off\"\n      matStartDate\n      [formControl]=\"control1\"\n      [placeholder]=\"formControl.disabled ? '' : ('core.form.date-range.from' | translate)\"\n      (dateInput)=\"onStartChange($event)\"\n      (focus)=\"onFocus()\"\n      (blur)=\"onBlur()\"\n      (keyup.enter)=\"onEnter()\"\n      [attr.data-qclabel]=\"lbl\"\n      [attr.data-autoId]=\"autoId() + '-from'\" />\n\n    <input\n      aria-hidden=\"true\"\n      [id]=\"id2\"\n      [autocomplete]=\"id2\"\n      autocorrect=\"off\"\n      matEndDate\n      [formControl]=\"control2\"\n      [placeholder]=\"formControl.disabled ? '' : ('core.form.date-range.to' | translate)\"\n      (dateInput)=\"onEndChange($event)\"\n      (focus)=\"onFocus()\"\n      (blur)=\"onBlur()\"\n      (keyup.enter)=\"onEnter()\"\n      [attr.data-qclabel]=\"lbl\"\n      [attr.data-autoId]=\"autoId() + '-to'\" />\n  </mat-date-range-input>\n\n  @if (hideErr && errMsg && (formControl.touched || control1.touched || control2.touched)) {\n    <mat-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"errMsg\" matTooltipPosition=\"above\"> error </mat-icon>\n  }\n\n  @if (!hideErr && errMsg && (formControl.touched || control1.touched || control2.touched)) {\n    <mat-error>{{ errMsg }}</mat-error>\n  }\n\n  @if ((control1.value || control2.value) && !_bare) {\n    <mat-icon class=\"cursor-pointer sd-suffix-icon\" (click)=\"clear()\" matSuffix>cancel</mat-icon>\n  }\n\n  <mat-icon class=\"cursor-pointer sd-suffix-icon\" (click)=\"onOpenPicker($event)\" matSuffix>today</mat-icon>\n\n  <mat-date-range-picker [touchUi]=\"isMobileOrTablet\" (closed)=\"onClosePicker()\" #picker></mat-date-range-picker>\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(.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{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-start-date:disabled,:host ::ng-deep .mat-mdc-form-field input.mat-mdc-end-date: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 ::ng-deep .sd-md mat-date-range-input{padding-top:12px;font-size:14px}:host ::ng-deep .sd-sm mat-date-range-input{padding-top:4px;font-size:14px}: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: "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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { 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: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i5.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i6.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i6.MatStartDate, selector: "input[matStartDate]", outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i6.MatEndDate, selector: "input[matEndDate]", outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i6.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "ngmodule", type: MatNativeDateModule }, { 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: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: SdDateRange, decorators: [{
            type: Component,
            args: [{ selector: 'sd-date-range', changeDetection: ChangeDetectionStrategy.OnPush, host: { '[class.sd-bare]': 'isInline()', '[class.sd-viewed]': 'isViewed() || isInline()', '[class.sd-has-label]': '!!label()' }, providers: [
                        // DateFnsAdapter inject MAT_DATE_LOCALE; cấp default en-US để parse/format hoạt động.
                        { 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,
                        MatIconModule,
                        MatTooltipModule,
                        MatFormFieldModule,
                        MatDatepickerModule,
                        MatNativeDateModule,
                        SdLabel,
                        SdView,
                        TranslatePipe,
                    ], template: "@let lblDef = sdLabelDef();\n@let lbl = label();\n@let app = appearance();\n@let req = required();\n@let hideErr = hideInlineError();\n@let errMsg = errorMessage();\n@let hText = helperText();\n@let minD = resolvedMin();\n@let maxD = resolvedMax();\n@let sz = size();\n@let _isInline = isInline();\n@let _bare = _isInline;\n@let _hasValue = !!(control1.value || control2.value);\n\n@if (isViewed()) {\n  <sd-view\n    [label]=\"lbl\"\n    [labelTemplate]=\"lblDef?.templateRef ?? null\"\n    [value]=\"valueModel()\"\n    [display]=\"formatted()\"\n    [valueTemplate]=\"sdValueTemplate()\">\n  </sd-view>\n} @else {\n  @if (_isInline) {\n    <!-- why: inline \u2014 sd-view l\u00E0 \"m\u1EB7t\" + trigger; range editor render \u1EA9n (.sd-inline-editor) ch\u1EC9 \u0111\u1EC3 m\u1EDF picker. -->\n    <span class=\"sd-inline-view\" role=\"button\" tabindex=\"0\" (click)=\"enterInlineEdit()\" (keydown.enter)=\"enterInlineEdit()\">\n      <sd-view\n        [label]=\"lbl\"\n        [labelTemplate]=\"lblDef?.templateRef ?? null\"\n        [value]=\"valueModel()\"\n        [display]=\"formatted()\"\n        [valueTemplate]=\"sdValueTemplate()\">\n      </sd-view>\n      @if (clearable() && _hasValue && !req && !formControl.disabled) {\n        <button type=\"button\" class=\"sd-inline-clear\" (click)=\"$event.stopPropagation(); clear()\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\n          <mat-icon>close</mat-icon>\n        </button>\n      }\n    </span>\n  }\n\n  <div [class.sd-inline-editor]=\"_isInline\">\n@if (!app && lblDef?.templateRef) {\n  <ng-container *ngTemplateOutlet=\"lblDef!.templateRef\"> </ng-container>\n}\n@if (!app && lbl && !lblDef?.templateRef) {\n  <sd-label [label]=\"lbl\" [required]=\"req\"></sd-label>\n}\n\n<mat-form-field\n  [class.sd-md]=\"sz === 'md'\"\n  [class.sd-sm]=\"sz === '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  <mat-date-range-input [max]=\"maxD\" [min]=\"minD\" [rangePicker]=\"picker\" [disabled]=\"formControl.disabled\" [required]=\"req\"\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      aria-hidden=\"true\"\n      [id]=\"id1\"\n      autocomplete=\"off\"\n      autocorrect=\"off\"\n      matStartDate\n      [formControl]=\"control1\"\n      [placeholder]=\"formControl.disabled ? '' : ('core.form.date-range.from' | translate)\"\n      (dateInput)=\"onStartChange($event)\"\n      (focus)=\"onFocus()\"\n      (blur)=\"onBlur()\"\n      (keyup.enter)=\"onEnter()\"\n      [attr.data-qclabel]=\"lbl\"\n      [attr.data-autoId]=\"autoId() + '-from'\" />\n\n    <input\n      aria-hidden=\"true\"\n      [id]=\"id2\"\n      [autocomplete]=\"id2\"\n      autocorrect=\"off\"\n      matEndDate\n      [formControl]=\"control2\"\n      [placeholder]=\"formControl.disabled ? '' : ('core.form.date-range.to' | translate)\"\n      (dateInput)=\"onEndChange($event)\"\n      (focus)=\"onFocus()\"\n      (blur)=\"onBlur()\"\n      (keyup.enter)=\"onEnter()\"\n      [attr.data-qclabel]=\"lbl\"\n      [attr.data-autoId]=\"autoId() + '-to'\" />\n  </mat-date-range-input>\n\n  @if (hideErr && errMsg && (formControl.touched || control1.touched || control2.touched)) {\n    <mat-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"errMsg\" matTooltipPosition=\"above\"> error </mat-icon>\n  }\n\n  @if (!hideErr && errMsg && (formControl.touched || control1.touched || control2.touched)) {\n    <mat-error>{{ errMsg }}</mat-error>\n  }\n\n  @if ((control1.value || control2.value) && !_bare) {\n    <mat-icon class=\"cursor-pointer sd-suffix-icon\" (click)=\"clear()\" matSuffix>cancel</mat-icon>\n  }\n\n  <mat-icon class=\"cursor-pointer sd-suffix-icon\" (click)=\"onOpenPicker($event)\" matSuffix>today</mat-icon>\n\n  <mat-date-range-picker [touchUi]=\"isMobileOrTablet\" (closed)=\"onClosePicker()\" #picker></mat-date-range-picker>\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(.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{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-start-date:disabled,:host ::ng-deep .mat-mdc-form-field input.mat-mdc-end-date: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 ::ng-deep .sd-md mat-date-range-input{padding-top:12px;font-size:14px}:host ::ng-deep .sd-sm mat-date-range-input{padding-top:4px;font-size:14px}: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: { picker: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatDateRangePicker), { 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 }] }], 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 }] }], sdValueTemplate: [{ type: i0.ContentChild, args: ['sdValue', { isSignal: true }] }], 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 }] }], maxInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], valueModel: [{ type: i0.Input, args: [{ isSignal: true, alias: "model", required: false }] }, { type: i0.Output, args: ["modelChange"] }], sdChange: [{ type: i0.Output, args: ["sdChange"] }] } });

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

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