import { CommonModule } from '@angular/common';
import { NgModule, Component, ViewChild, Output, EventEmitter, HostListener, HostBinding } from '@angular/core';
import { IgxCalendarComponent, IgxCalendarModule } from '../../calendar/public_api';
import { PickerInteractionMode } from '../../date-common/types';
import { IgxButtonModule } from '../../directives/button/button.directive';
import { IgxRippleModule } from '../../directives/ripple/ripple.directive';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "../../directives/button/button.directive";
import * as i3 from "../../directives/ripple/ripple.directive";
import * as i4 from "../../calendar/calendar.component";
/** @hidden */
export class IgxCalendarContainerComponent {
    constructor() {
        this.calendarClose = new EventEmitter();
        this.todaySelection = new EventEmitter();
        this.styleClass = 'igx-date-picker';
        this.vertical = false;
        this.mode = PickerInteractionMode.DropDown;
    }
    get dropdownCSS() {
        return this.mode === PickerInteractionMode.DropDown;
    }
    get verticalCSS() {
        return this.vertical && this.mode === PickerInteractionMode.Dialog;
    }
    onEscape(event) {
        event.preventDefault();
        this.calendarClose.emit();
    }
    get isReadonly() {
        return this.mode === PickerInteractionMode.Dialog;
    }
}
IgxCalendarContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: IgxCalendarContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
IgxCalendarContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.3", type: IgxCalendarContainerComponent, selector: "igx-calendar-container", outputs: { calendarClose: "calendarClose", todaySelection: "todaySelection" }, host: { listeners: { "keydown.alt.arrowup": "onEscape($event)" }, properties: { "class.igx-date-picker": "this.styleClass", "class.igx-date-picker--dropdown": "this.dropdownCSS", "class.igx-date-picker--vertical": "this.verticalCSS" } }, viewQueries: [{ propertyName: "calendar", first: true, predicate: IgxCalendarComponent, descendants: true, static: true }], ngImport: i0, template: "<ng-template #defaultPickerActions>\n    <div *ngIf=\"this.closeButtonLabel || this.todayButtonLabel\" class=\"igx-date-picker__buttons\">\n        <button #closeButton *ngIf=\"this.closeButtonLabel\" igxButton=\"flat\" igxRipple\n            (click)=\"this.calendarClose.emit({ owner: this })\">\n            {{ this.closeButtonLabel }}\n        </button>\n        <button #todayButton *ngIf=\"this.todayButtonLabel\" igxButton=\"flat\" igxRipple\n            (click)=\"this.todaySelection.emit({ owner: this })\">\n            {{ this.todayButtonLabel }}\n        </button>\n    </div>\n</ng-template>\n\n<igx-calendar></igx-calendar>\n<ng-container *ngTemplateOutlet=\"this.pickerActions?.template || defaultPickerActions; context: { $implicit: this.calendar }\">\n</ng-container>\n", styles: [":host{display:block}\n"], dependencies: [{ 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.IgxButtonDirective, selector: "[igxButton]", inputs: ["selected", "igxButton", "igxButtonColor", "igxButtonBackground", "igxLabel", "disabled"], outputs: ["buttonClick", "buttonSelected"] }, { kind: "directive", type: i3.IgxRippleDirective, selector: "[igxRipple]", inputs: ["igxRippleTarget", "igxRipple", "igxRippleDuration", "igxRippleCentered", "igxRippleDisabled"] }, { kind: "component", type: i4.IgxCalendarComponent, selector: "igx-calendar", inputs: ["id", "hasHeader", "vertical", "monthsViewNumber", "showWeekNumbers", "animationAction"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: IgxCalendarContainerComponent, decorators: [{
            type: Component,
            args: [{ selector: 'igx-calendar-container', template: "<ng-template #defaultPickerActions>\n    <div *ngIf=\"this.closeButtonLabel || this.todayButtonLabel\" class=\"igx-date-picker__buttons\">\n        <button #closeButton *ngIf=\"this.closeButtonLabel\" igxButton=\"flat\" igxRipple\n            (click)=\"this.calendarClose.emit({ owner: this })\">\n            {{ this.closeButtonLabel }}\n        </button>\n        <button #todayButton *ngIf=\"this.todayButtonLabel\" igxButton=\"flat\" igxRipple\n            (click)=\"this.todaySelection.emit({ owner: this })\">\n            {{ this.todayButtonLabel }}\n        </button>\n    </div>\n</ng-template>\n\n<igx-calendar></igx-calendar>\n<ng-container *ngTemplateOutlet=\"this.pickerActions?.template || defaultPickerActions; context: { $implicit: this.calendar }\">\n</ng-container>\n", styles: [":host{display:block}\n"] }]
        }], propDecorators: { calendar: [{
                type: ViewChild,
                args: [IgxCalendarComponent, { static: true }]
            }], calendarClose: [{
                type: Output
            }], todaySelection: [{
                type: Output
            }], styleClass: [{
                type: HostBinding,
                args: ['class.igx-date-picker']
            }], dropdownCSS: [{
                type: HostBinding,
                args: ['class.igx-date-picker--dropdown']
            }], verticalCSS: [{
                type: HostBinding,
                args: ['class.igx-date-picker--vertical']
            }], onEscape: [{
                type: HostListener,
                args: ['keydown.alt.arrowup', ['$event']]
            }] } });
/** @hidden */
export class IgxCalendarContainerModule {
}
IgxCalendarContainerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: IgxCalendarContainerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
IgxCalendarContainerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.3", ngImport: i0, type: IgxCalendarContainerModule, declarations: [IgxCalendarContainerComponent], imports: [CommonModule,
        IgxButtonModule,
        IgxRippleModule,
        IgxCalendarModule], exports: [IgxCalendarContainerComponent] });
IgxCalendarContainerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: IgxCalendarContainerModule, imports: [CommonModule,
        IgxButtonModule,
        IgxRippleModule,
        IgxCalendarModule] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: IgxCalendarContainerModule, decorators: [{
            type: NgModule,
            args: [{
                    declarations: [IgxCalendarContainerComponent],
                    imports: [
                        CommonModule,
                        IgxButtonModule,
                        IgxRippleModule,
                        IgxCalendarModule
                    ],
                    exports: [IgxCalendarContainerComponent]
                }]
        }] });
//# sourceMappingURL=data:application/json;base64, 