import { Component, EventEmitter, Input, Output } from '@angular/core';
import { Color } from '@mintplayer/ng-bootstrap';
import * as i0 from "@angular/core";
import * as i1 from "@mintplayer/ng-bootstrap/calendar";
import * as i2 from "@mintplayer/ng-bootstrap/dropdown";
import * as i3 from "@mintplayer/ng-bootstrap/has-overlay";
import * as i4 from "@mintplayer/ng-bootstrap/button-type";
import * as i5 from "@angular/common";
export class BsDatepickerComponent {
    constructor() {
        this.colors = Color;
        //#region SelectedDate
        this._selectedDate = new Date();
        this.selectedDateChange = new EventEmitter();
        //#endregion
        //#region CurrentMonth
        this._currentMonth = new Date();
        this.currentMonthChange = new EventEmitter();
    }
    get selectedDate() {
        return this._selectedDate;
    }
    set selectedDate(value) {
        this._selectedDate = value;
        this.selectedDateChange.emit(value);
    }
    get currentMonth() {
        return this._currentMonth;
    }
    set currentMonth(value) {
        this._currentMonth = value;
        this.currentMonthChange.emit(value);
    }
}
BsDatepickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: BsDatepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
BsDatepickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: BsDatepickerComponent, selector: "bs-datepicker", inputs: { selectedDate: "selectedDate", currentMonth: "currentMonth" }, outputs: { selectedDateChange: "selectedDateChange", currentMonthChange: "currentMonthChange" }, ngImport: i0, template: "<!-- <bs-dropdown [hasBackdrop]=\"true\" [closeOnClickOutside]=\"true\"></bs-dropdown> -->\n<div bsDropdown [hasBackdrop]=\"true\" [closeOnClickOutside]=\"true\">\n    <button bsDropdownToggle [color]=\"colors.primary\">{{ selectedDate | date }}</button>\n    <bs-has-overlay></bs-has-overlay>\n    <div *bsDropdownMenu>\n        <bs-calendar [(selectedDate)]=\"selectedDate\" [(currentMonth)]=\"currentMonth\"></bs-calendar>\n    </div>\n</div>", styles: [""], dependencies: [{ kind: "component", type: i1.BsCalendarComponent, selector: "bs-calendar", inputs: ["currentMonth", "selectedDate"], outputs: ["currentMonthChange", "selectedDateChange"] }, { kind: "directive", type: i2.BsDropdownDirective, selector: "[bsDropdown]", inputs: ["hasBackdrop", "sameWidth", "closeOnClickOutside", "sameDropdownWidth", "isOpen"], outputs: ["isOpenChange"] }, { kind: "directive", type: i2.BsDropdownToggleDirective, selector: "[bsDropdownToggle]" }, { kind: "directive", type: i2.BsDropdownMenuDirective, selector: "[bsDropdownMenu]" }, { kind: "component", type: i3.BsHasOverlayComponent, selector: "bs-has-overlay" }, { kind: "directive", type: i4.BsButtonTypeDirective, selector: "button[color],input[type=\"button\"][color],input[type=\"submit\"][color]", inputs: ["color"] }, { kind: "pipe", type: i5.DatePipe, name: "date" }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: BsDatepickerComponent, decorators: [{
            type: Component,
            args: [{ selector: 'bs-datepicker', template: "<!-- <bs-dropdown [hasBackdrop]=\"true\" [closeOnClickOutside]=\"true\"></bs-dropdown> -->\n<div bsDropdown [hasBackdrop]=\"true\" [closeOnClickOutside]=\"true\">\n    <button bsDropdownToggle [color]=\"colors.primary\">{{ selectedDate | date }}</button>\n    <bs-has-overlay></bs-has-overlay>\n    <div *bsDropdownMenu>\n        <bs-calendar [(selectedDate)]=\"selectedDate\" [(currentMonth)]=\"currentMonth\"></bs-calendar>\n    </div>\n</div>" }]
        }], propDecorators: { selectedDateChange: [{
                type: Output
            }], selectedDate: [{
                type: Input
            }], currentMonthChange: [{
                type: Output
            }], currentMonth: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZXBpY2tlci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL21pbnRwbGF5ZXItbmctYm9vdHN0cmFwL2RhdGVwaWNrZXIvc3JjL2RhdGVwaWNrZXIu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