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/button-type";
import * as i4 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.0.4", ngImport: i0, type: BsDatepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
BsDatepickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", 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    <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: "directive", type: i3.BsButtonTypeDirective, selector: "button[color],input[type=\"button\"][color],input[type=\"submit\"][color]", inputs: ["color"] }, { kind: "pipe", type: i4.DatePipe, name: "date" }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", 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    <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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZXBpY2tlci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL21pbnRwbGF5ZXItbmctYm9vdHN0cmFwL2RhdGVwaWNrZXIvc3JjL2RhdGVwaWNrZXIuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9taW50cGxheWVyLW5nLWJvb3RzdHJhcC9kYXRlcGlja2VyL3NyYy9kYXRlcGlja2VyLmNvbX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