import { Component } from '@angular/core';
import { MatCalendarHeader } from '@angular/material/datepicker';
import * as i0 from "@angular/core";
import * as i1 from "../../button/button.component";
import * as i2 from "../../../icon/icon.component";
import * as i3 from "@angular/common";
export class CalendarHeaderComponent extends MatCalendarHeader {
    selectDay() {
        this.calendar.currentView = 'month';
    }
    selectYear() {
        this.calendar.currentView = 'multi-year';
    }
}
CalendarHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: CalendarHeaderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
CalendarHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.4", type: CalendarHeaderComponent, selector: "ui-calendar-header", usesInheritance: true, ngImport: i0, template: "<div class=\"arrow\">\n  <button ui-button-ghost size=\"s\" color=\"contrast-40\"\n          [disabled]=\"!previousEnabled()\"\n          (click)=\"previousClicked()\"\n          [attr.aria-label]=\"prevButtonLabel\">\n    <ui-icon name=\"chevron-left\"></ui-icon>\n  </button>\n</div>\n\n<div [ngSwitch]=\"calendar.currentView\">\n  <ng-container *ngSwitchCase=\"'month'\">\n    <button type=\"button\" class=\"mat-calendar-period-button\" (click)=\"selectYear()\">\n      {{calendar.activeDate | date: 'MMMM, yyyy'}}\n      <ui-icon name=\"chevron-down\" class=\"chevron\" color=\"contrast-40\"></ui-icon>\n    </button>\n  </ng-container>\n  <ng-container *ngSwitchCase=\"'year'\">\n    <button type=\"button\" class=\"mat-calendar-period-button\" (click)=\"selectDay()\">\n      {{calendar.activeDate | date: 'yyyy'}}\n      <ui-icon name=\"chevron-up\" class=\"chevron\" color=\"contrast-40\"></ui-icon>\n    </button>\n  </ng-container>\n  <ng-container *ngSwitchCase=\"'multi-year'\">\n    <button type=\"button\" class=\"mat-calendar-period-button\" (click)=\"selectDay()\">\n      {{periodButtonText}}\n      <ui-icon name=\"chevron-up\" class=\"chevron\" color=\"contrast-40\"></ui-icon>\n    </button>\n  </ng-container>\n</div>\n\n<div class=\"arrow\">\n  <button ui-button-ghost size=\"s\" color=\"contrast-40\"\n          [disabled]=\"!nextEnabled()\"\n          (click)=\"nextClicked()\"\n          [attr.aria-label]=\"nextButtonLabel\">\n    <ui-icon name=\"chevron-right\"></ui-icon>\n  </button>\n</div>\n", styles: [":host{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px;height:40px;padding:0 6px}.arrow{color:var(--color-contrast-40)}.chevron{margin-left:8px}\n"], components: [{ type: i1.ButtonComponent, selector: "[ui-button], [ui-button-outline], [ui-button-ghost]", inputs: ["color", "size", "icon", "iconRight", "disabled", "loading", "filled"] }, { type: i2.IconComponent, selector: "ui-icon", inputs: ["name", "color", "size", "stroke", "styles"] }], directives: [{ type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], pipes: { "date": i3.DatePipe } });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: CalendarHeaderComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ui-calendar-header', template: "<div class=\"arrow\">\n  <button ui-button-ghost size=\"s\" color=\"contrast-40\"\n          [disabled]=\"!previousEnabled()\"\n          (click)=\"previousClicked()\"\n          [attr.aria-label]=\"prevButtonLabel\">\n    <ui-icon name=\"chevron-left\"></ui-icon>\n  </button>\n</div>\n\n<div [ngSwitch]=\"calendar.currentView\">\n  <ng-container *ngSwitchCase=\"'month'\">\n    <button type=\"button\" class=\"mat-calendar-period-button\" (click)=\"selectYear()\">\n      {{calendar.activeDate | date: 'MMMM, yyyy'}}\n      <ui-icon name=\"chevron-down\" class=\"chevron\" color=\"contrast-40\"></ui-icon>\n    </button>\n  </ng-container>\n  <ng-container *ngSwitchCase=\"'year'\">\n    <button type=\"button\" class=\"mat-calendar-period-button\" (click)=\"selectDay()\">\n      {{calendar.activeDate | date: 'yyyy'}}\n      <ui-icon name=\"chevron-up\" class=\"chevron\" color=\"contrast-40\"></ui-icon>\n    </button>\n  </ng-container>\n  <ng-container *ngSwitchCase=\"'multi-year'\">\n    <button type=\"button\" class=\"mat-calendar-period-button\" (click)=\"selectDay()\">\n      {{periodButtonText}}\n      <ui-icon name=\"chevron-up\" class=\"chevron\" color=\"contrast-40\"></ui-icon>\n    </button>\n  </ng-container>\n</div>\n\n<div class=\"arrow\">\n  <button ui-button-ghost size=\"s\" color=\"contrast-40\"\n          [disabled]=\"!nextEnabled()\"\n          (click)=\"nextClicked()\"\n          [attr.aria-label]=\"nextButtonLabel\">\n    <ui-icon name=\"chevron-right\"></ui-icon>\n  </button>\n</div>\n", styles: [":host{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px;height:40px;padding:0 6px}.arrow{color:var(--color-contrast-40)}.chevron{margin-left:8px}\n"] }]
        }] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FsZW5kYXItaGVhZGVyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3VpLWtpdC9zcmMvbGliL2Zvcm0vZGF0ZXBpY2tlci9jYWxlbmRhci1oZWFkZXIvY2FsZW5kYXItaGVhZGVyLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3VpLWtpdC9zcmMvbGliL2Zvcm0vZGF0ZXBpY2tlci9jYWxlbmRhci1oZWFkZXIvY2FsZW5kYXItaGVhZGVyLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxTQUFTLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDeEMsT0FBTyxFQUFDLGlCQUFpQixFQUFDLE1BQU0sOEJBQThCLENBQUM7Ozs7O0FBTy9ELE1BQU0sT0FBTyx1QkFBd0IsU0FBUSxpQkFBdUI7SUFFbEUsU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