/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes} checked by tsc
 */
import { Directive, ElementRef, EventEmitter, Host, HostBinding, HostListener, Input, Output, TemplateRef } from '@angular/core';
import { IgxCalendarComponent } from './calendar.component';
/**
 * @hidden
 */
var IgxCalendarYearDirective = /** @class */ (function () {
    function IgxCalendarYearDirective(calendar) {
        this.calendar = calendar;
        this.onYearSelection = new EventEmitter();
    }
    Object.defineProperty(IgxCalendarYearDirective.prototype, "defaultCSS", {
        get: /**
         * @return {?}
         */
        function () {
            return !this.isCurrentYear;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCalendarYearDirective.prototype, "currentCSS", {
        get: /**
         * @return {?}
         */
        function () {
            return this.isCurrentYear;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCalendarYearDirective.prototype, "isCurrentYear", {
        get: /**
         * @return {?}
         */
        function () {
            return this.calendar.isCurrentYear(this.value);
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    IgxCalendarYearDirective.prototype.onClick = /**
     * @return {?}
     */
    function () {
        this.onYearSelection.emit(this.value);
    };
    IgxCalendarYearDirective.decorators = [
        { type: Directive, args: [{
                    selector: '[igxCalendarYear]'
                },] },
    ];
    /** @nocollapse */
    IgxCalendarYearDirective.ctorParameters = function () { return [
        { type: IgxCalendarComponent, decorators: [{ type: Host },] },
    ]; };
    IgxCalendarYearDirective.propDecorators = {
        "value": [{ type: Input, args: ['igxCalendarYear',] },],
        "onYearSelection": [{ type: Output },],
        "defaultCSS": [{ type: HostBinding, args: ['class.igx-calendar__year',] },],
        "currentCSS": [{ type: HostBinding, args: ['class.igx-calendar__year--current',] },],
        "onClick": [{ type: HostListener, args: ['click',] },],
    };
    return IgxCalendarYearDirective;
}());
export { IgxCalendarYearDirective };
function IgxCalendarYearDirective_tsickle_Closure_declarations() {
    /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
    IgxCalendarYearDirective.decorators;
    /**
     * @nocollapse
     * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>}
     */
    IgxCalendarYearDirective.ctorParameters;
    /** @type {!Object<string,!Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
    IgxCalendarYearDirective.propDecorators;
    /** @type {?} */
    IgxCalendarYearDirective.prototype.value;
    /** @type {?} */
    IgxCalendarYearDirective.prototype.onYearSelection;
    /** @type {?} */
    IgxCalendarYearDirective.prototype.calendar;
}
var IgxCalendarMonthDirective = /** @class */ (function () {
    function IgxCalendarMonthDirective(calendar) {
        this.calendar = calendar;
        this.onMonthSelection = new EventEmitter();
    }
    Object.defineProperty(IgxCalendarMonthDirective.prototype, "defaultCSS", {
        get: /**
         * @return {?}
         */
        function () {
            return !this.isCurrentMonth;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCalendarMonthDirective.prototype, "currentCSS", {
        get: /**
         * @return {?}
         */
        function () {
            return this.isCurrentMonth;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCalendarMonthDirective.prototype, "isCurrentMonth", {
        get: /**
         * @return {?}
         */
        function () {
            return this.calendar.isCurrentMonth(this.value);
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    IgxCalendarMonthDirective.prototype.onClick = /**
     * @return {?}
     */
    function () {
        this.onMonthSelection.emit(this.value);
    };
    IgxCalendarMonthDirective.decorators = [
        { type: Directive, args: [{
                    selector: '[igxCalendarMonth]'
                },] },
    ];
    /** @nocollapse */
    IgxCalendarMonthDirective.ctorParameters = function () { return [
        { type: IgxCalendarComponent, decorators: [{ type: Host },] },
    ]; };
    IgxCalendarMonthDirective.propDecorators = {
        "value": [{ type: Input, args: ['igxCalendarMonth',] },],
        "index": [{ type: Input },],
        "onMonthSelection": [{ type: Output },],
        "defaultCSS": [{ type: HostBinding, args: ['class.igx-calendar__month',] },],
        "currentCSS": [{ type: HostBinding, args: ['class.igx-calendar__month--current',] },],
        "onClick": [{ type: HostListener, args: ['click',] },],
    };
    return IgxCalendarMonthDirective;
}());
export { IgxCalendarMonthDirective };
function IgxCalendarMonthDirective_tsickle_Closure_declarations() {
    /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
    IgxCalendarMonthDirective.decorators;
    /**
     * @nocollapse
     * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>}
     */
    IgxCalendarMonthDirective.ctorParameters;
    /** @type {!Object<string,!Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
    IgxCalendarMonthDirective.propDecorators;
    /** @type {?} */
    IgxCalendarMonthDirective.prototype.value;
    /** @type {?} */
    IgxCalendarMonthDirective.prototype.index;
    /** @type {?} */
    IgxCalendarMonthDirective.prototype.onMonthSelection;
    /** @type {?} */
    IgxCalendarMonthDirective.prototype.calendar;
}
var IgxCalendarDateDirective = /** @class */ (function () {
    function IgxCalendarDateDirective(calendar, elementRef) {
        this.calendar = calendar;
        this.elementRef = elementRef;
        this.onDateSelection = new EventEmitter();
        this.tabindex = 0;
        this._selected = false;
    }
    Object.defineProperty(IgxCalendarDateDirective.prototype, "selected", {
        get: /**
         * @return {?}
         */
        function () {
            var /** @type {?} */ date = this.date.date;
            if (!this.calendar.value) {
                return;
            }
            if (this.calendar.selection === 'single') {
                this._selected = (/** @type {?} */ (this.calendar.value)).toDateString() === date.toDateString();
            }
            else {
                this._selected = (/** @type {?} */ (this.calendar.value))
                    .some(function (each) { return each.toDateString() === date.toDateString(); });
            }
            return this._selected;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._selected = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCalendarDateDirective.prototype, "isCurrentMonth", {
        get: /**
         * @return {?}
         */
        function () {
            return this.date.isCurrentMonth;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCalendarDateDirective.prototype, "isPreviousMonth", {
        get: /**
         * @return {?}
         */
        function () {
            return this.date.isPrevMonth;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCalendarDateDirective.prototype, "isNextMonth", {
        get: /**
         * @return {?}
         */
        function () {
            return this.date.isNextMonth;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCalendarDateDirective.prototype, "nativeElement", {
        get: /**
         * @return {?}
         */
        function () {
            return this.elementRef.nativeElement;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCalendarDateDirective.prototype, "isInactive", {
        get: /**
         * @return {?}
         */
        function () {
            return this.date.isNextMonth || this.date.isPrevMonth;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCalendarDateDirective.prototype, "isToday", {
        get: /**
         * @return {?}
         */
        function () {
            var /** @type {?} */ today = new Date(Date.now());
            var /** @type {?} */ date = this.date.date;
            return (date.getFullYear() === today.getFullYear() &&
                date.getMonth() === today.getMonth() &&
                date.getDate() === today.getDate());
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCalendarDateDirective.prototype, "isWeekend", {
        get: /**
         * @return {?}
         */
        function () {
            var /** @type {?} */ day = this.date.date.getDay();
            return day === 0 || day === 6;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCalendarDateDirective.prototype, "defaultCSS", {
        get: /**
         * @return {?}
         */
        function () {
            return this.date.isCurrentMonth && !(this.isWeekend && this.selected);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCalendarDateDirective.prototype, "isInactiveCSS", {
        get: /**
         * @return {?}
         */
        function () {
            return this.isInactive;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCalendarDateDirective.prototype, "isTodayCSS", {
        get: /**
         * @return {?}
         */
        function () {
            return this.isToday && !this.selected;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCalendarDateDirective.prototype, "isSelectedCSS", {
        get: /**
         * @return {?}
         */
        function () {
            return this.selected;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCalendarDateDirective.prototype, "isWeekendCSS", {
        get: /**
         * @return {?}
         */
        function () {
            return this.isWeekend;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    IgxCalendarDateDirective.prototype.onSelect = /**
     * @return {?}
     */
    function () {
        this.onDateSelection.emit(this.date);
    };
    IgxCalendarDateDirective.decorators = [
        { type: Directive, args: [{
                    selector: '[igxCalendarDate]'
                },] },
    ];
    /** @nocollapse */
    IgxCalendarDateDirective.ctorParameters = function () { return [
        { type: IgxCalendarComponent, decorators: [{ type: Host },] },
        { type: ElementRef, },
    ]; };
    IgxCalendarDateDirective.propDecorators = {
        "date": [{ type: Input, args: ['igxCalendarDate',] },],
        "onDateSelection": [{ type: Output },],
        "tabindex": [{ type: HostBinding, args: ['attr.tabindex',] },],
        "defaultCSS": [{ type: HostBinding, args: ['class.igx-calendar__date',] },],
        "isInactiveCSS": [{ type: HostBinding, args: ['class.igx-calendar__date--inactive',] },],
        "isTodayCSS": [{ type: HostBinding, args: ['class.igx-calendar__date--current',] },],
        "isSelectedCSS": [{ type: HostBinding, args: ['class.igx-calendar__date--selected',] },],
        "isWeekendCSS": [{ type: HostBinding, args: ['class.igx-calendar__date--weekend',] },],
        "onSelect": [{ type: HostListener, args: ['click',] }, { type: HostListener, args: ['keydown.enter',] },],
    };
    return IgxCalendarDateDirective;
}());
export { IgxCalendarDateDirective };
function IgxCalendarDateDirective_tsickle_Closure_declarations() {
    /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
    IgxCalendarDateDirective.decorators;
    /**
     * @nocollapse
     * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>}
     */
    IgxCalendarDateDirective.ctorParameters;
    /** @type {!Object<string,!Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
    IgxCalendarDateDirective.propDecorators;
    /** @type {?} */
    IgxCalendarDateDirective.prototype.date;
    /** @type {?} */
    IgxCalendarDateDirective.prototype.onDateSelection;
    /** @type {?} */
    IgxCalendarDateDirective.prototype.tabindex;
    /** @type {?} */
    IgxCalendarDateDirective.prototype._selected;
    /** @type {?} */
    IgxCalendarDateDirective.prototype.calendar;
    /** @type {?} */
    IgxCalendarDateDirective.prototype.elementRef;
}
var IgxCalendarHeaderTemplateDirective = /** @class */ (function () {
    function IgxCalendarHeaderTemplateDirective(template) {
        this.template = template;
    }
    IgxCalendarHeaderTemplateDirective.decorators = [
        { type: Directive, args: [{
                    selector: '[igxCalendarHeader]'
                },] },
    ];
    /** @nocollapse */
    IgxCalendarHeaderTemplateDirective.ctorParameters = function () { return [
        { type: TemplateRef, },
    ]; };
    return IgxCalendarHeaderTemplateDirective;
}());
export { IgxCalendarHeaderTemplateDirective };
function IgxCalendarHeaderTemplateDirective_tsickle_Closure_declarations() {
    /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
    IgxCalendarHeaderTemplateDirective.decorators;
    /**
     * @nocollapse
     * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>}
     */
    IgxCalendarHeaderTemplateDirective.ctorParameters;
    /** @type {?} */
    IgxCalendarHeaderTemplateDirective.prototype.template;
}
var IgxCalendarSubheaderTemplateDirective = /** @class */ (function () {
    function IgxCalendarSubheaderTemplateDirective(template) {
        this.template = template;
    }
    IgxCalendarSubheaderTemplateDirective.decorators = [
        { type: Directive, args: [{
                    selector: '[igxCalendarSubheader]'
                },] },
    ];
    /** @nocollapse */
    IgxCalendarSubheaderTemplateDirective.ctorParameters = function () { return [
        { type: TemplateRef, },
    ]; };
    return IgxCalendarSubheaderTemplateDirective;
}());
export { IgxCalendarSubheaderTemplateDirective };
function IgxCalendarSubheaderTemplateDirective_tsickle_Closure_declarations() {
    /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
    IgxCalendarSubheaderTemplateDirective.decorators;
    /**
     * @nocollapse
     * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>}
     */
    IgxCalendarSubheaderTemplateDirective.ctorParameters;
    /** @type {?} */
    IgxCalendarSubheaderTemplateDirective.prototype.template;
}

//# sourceMappingURL=data:application/json;base64, 