import { Component, Input } from '@angular/core';
import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
import { DateFnsDateAdapter, MAT_DATE_FNS_DATE_FORMATS } from '@aztrix/helpers';
import { ValueEdit } from '../../value-edit';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@angular/forms";
import * as i3 from "@angular/material/legacy-form-field";
import * as i4 from "@angular/material/legacy-input";
import * as i5 from "@aztrix/components/clear-button";
import * as i6 from "@angular/material/datepicker";
import * as i7 from "@aztrix/icons";
import * as i8 from "@aztrix/components/property-published-button";
export class DateEditComponent extends ValueEdit {
    constructor() {
        super(...arguments);
        this.minDate = new Date(1900, 0, 1);
        this.maxDate = new Date(2100, 0, 1);
        this.startView = 'multi-year';
    }
}
DateEditComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: DateEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
DateEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.5", type: DateEditComponent, selector: "ax-date-edit", inputs: { minDate: "minDate", maxDate: "maxDate", startView: "startView" }, providers: [
        { provide: DateAdapter, useClass: DateFnsDateAdapter },
        { provide: MAT_DATE_FORMATS, useValue: MAT_DATE_FNS_DATE_FORMATS },
    ], usesInheritance: true, ngImport: i0, template: "<ax-icon *ngIf=\"icon\" class=\"icon type-icon\" [name]=\"icon\"></ax-icon>\n<mat-form-field\n  class=\"c-input\"\n  [ngClass]=\"{'remove-subtext': !errorsTemplate && !hint}\"\n  appearance=\"outline\"\n  [floatLabel]=\"floatLabel\"\n>\n  <mat-label\n    ><span *ngIf=\"label\">{{ label }}</span></mat-label\n  >\n  <input\n    [name]=\"getName()\"\n    (click)=\"datePicker.open()\"\n    matInput\n    [matDatepicker]=\"datePicker\"\n    [min]=\"minDate\"\n    [max]=\"maxDate\"\n    axAutofocus\n    [autofocus]=\"autofocus\"\n    [formControl]=\"form\"\n    [required]=\"required\"\n    readonly\n    (focus)=\"focused.emit()\"\n  />\n  <ax-clear-button matSuffix *ngIf=\"hasValue && !form.disabled\" [form]=\"form\"></ax-clear-button>\n  <mat-datepicker-toggle matSuffix [for]=\"datePicker\"></mat-datepicker-toggle>\n  <mat-datepicker #datePicker [startView]=\"startView\"></mat-datepicker>\n  <mat-hint\n    [ngClass]=\"{collapsed}\"\n    (click)=\"collapsed = !collapsed\"\n    class=\"hint collapsible\"\n    align=\"end\"\n    #hintElement\n  >\n    <div><ax-icon *ngIf=\"isOverflowing()\" class=\"icon\" name=\"chevron-down\"></ax-icon></div>\n    <span [ngClass]=\"{overflowing: isOverflowing()}\">{{ hint }}</span>\n  </mat-hint>\n  <ng-content matSuffix></ng-content>\n  <mat-error>\n    <ng-template [ngTemplateOutlet]=\"errorsTemplate\"></ng-template>\n  </mat-error>\n</mat-form-field>\n<ax-property-published-button *ngIf=\"published\"></ax-property-published-button>\n", styles: [":host{display:block;position:relative}.type-icon{margin-top:19px}\n", ":host .type-icon{display:none}:host.showIcon{display:grid;grid-template-columns:38px 1fr}:host.showIcon .type-icon{display:inline}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatLegacyError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3.MatLegacyFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLegacyHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatLegacyLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatLegacySuffix, selector: "[matSuffix]" }, { kind: "directive", type: i4.MatLegacyInput, selector: "input[matInput], textarea[matInput], select[matNativeControl],      input[matNativeControl], textarea[matNativeControl]", exportAs: ["matInput"] }, { kind: "component", type: i5.ClearButtonComponent, selector: "ax-clear-button", inputs: ["form"] }, { kind: "component", type: i6.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i6.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i6.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i7.IconComponent, selector: "ax-icon", inputs: ["name", "inline"] }, { kind: "component", type: i8.PropertyPublishedButtonComponent, selector: "ax-property-published-button" }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: DateEditComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-date-edit', providers: [
                        { provide: DateAdapter, useClass: DateFnsDateAdapter },
                        { provide: MAT_DATE_FORMATS, useValue: MAT_DATE_FNS_DATE_FORMATS },
                    ], template: "<ax-icon *ngIf=\"icon\" class=\"icon type-icon\" [name]=\"icon\"></ax-icon>\n<mat-form-field\n  class=\"c-input\"\n  [ngClass]=\"{'remove-subtext': !errorsTemplate && !hint}\"\n  appearance=\"outline\"\n  [floatLabel]=\"floatLabel\"\n>\n  <mat-label\n    ><span *ngIf=\"label\">{{ label }}</span></mat-label\n  >\n  <input\n    [name]=\"getName()\"\n    (click)=\"datePicker.open()\"\n    matInput\n    [matDatepicker]=\"datePicker\"\n    [min]=\"minDate\"\n    [max]=\"maxDate\"\n    axAutofocus\n    [autofocus]=\"autofocus\"\n    [formControl]=\"form\"\n    [required]=\"required\"\n    readonly\n    (focus)=\"focused.emit()\"\n  />\n  <ax-clear-button matSuffix *ngIf=\"hasValue && !form.disabled\" [form]=\"form\"></ax-clear-button>\n  <mat-datepicker-toggle matSuffix [for]=\"datePicker\"></mat-datepicker-toggle>\n  <mat-datepicker #datePicker [startView]=\"startView\"></mat-datepicker>\n  <mat-hint\n    [ngClass]=\"{collapsed}\"\n    (click)=\"collapsed = !collapsed\"\n    class=\"hint collapsible\"\n    align=\"end\"\n    #hintElement\n  >\n    <div><ax-icon *ngIf=\"isOverflowing()\" class=\"icon\" name=\"chevron-down\"></ax-icon></div>\n    <span [ngClass]=\"{overflowing: isOverflowing()}\">{{ hint }}</span>\n  </mat-hint>\n  <ng-content matSuffix></ng-content>\n  <mat-error>\n    <ng-template [ngTemplateOutlet]=\"errorsTemplate\"></ng-template>\n  </mat-error>\n</mat-form-field>\n<ax-property-published-button *ngIf=\"published\"></ax-property-published-button>\n", styles: [":host{display:block;position:relative}.type-icon{margin-top:19px}\n", ":host .type-icon{display:none}:host.showIcon{display:grid;grid-template-columns:38px 1fr}:host.showIcon .type-icon{display:inline}\n"] }]
        }], propDecorators: { minDate: [{
                type: Input
            }], maxDate: [{
                type: Input
            }], startView: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 