import { p as proxyCustomElement, H, h } from './p-604af0ee.js';
import { d as defineCustomElement$2 } from './p-b7682164.js';
import { d as defineCustomElement$1 } from './p-888b8e69.js';

const MonthNavigator = /*@__PURE__*/ proxyCustomElement(class MonthNavigator extends H {
    constructor() {
        super();
        this.__registerHost();
        this.showArrows = true;
        //   @Event() monthChange: EventEmitter<Date>;
        this.handlePrevClick = () => {
            const prevMonth = new Date(this.currentMonth.getFullYear(), this.currentMonth.getMonth() - 1, 1);
            // this.monthChange.emit(prevMonth);
            this.onChange(prevMonth);
        };
        this.handleNextClick = () => {
            const nextMonth = new Date(this.currentMonth.getFullYear(), this.currentMonth.getMonth() + 1, 1);
            // this.monthChange.emit(nextMonth);
            this.onChange(nextMonth);
        };
    }
    render() {
        return (h("div", { key: '0d4f97e0f893a4f172ce98113501d391b7db51cb', class: "date-picker__navigator" }, h("div", { key: '066ac15e13f347affd979370f1a64771e012512b', class: "date-picker__navigator-label" }, this.currentMonth.toLocaleDateString('default', {
            month: 'long',
            year: 'numeric',
        })), this.showArrows && (h("div", { key: '2e2dfac28b681cb83fb4fe8423fe694888743e0e', class: "date-picker__navigator-buttons" }, h("dga-button", { key: 'e753b7581d900428607025c3fe6a9e95efcad840', variant: 'subtle', size: 'lg', iconOnly: true, iconType: 'arrow-left-02', iconProps: {
                variant: "stroke",
                type: "rounded"
            }, onClick: this.handlePrevClick }), h("dga-button", { key: '3588f3430696591c1e6b79f87f91a5443e6a5f33', variant: 'subtle', size: 'lg', iconOnly: true, iconType: 'arrow-right-02', iconProps: {
                variant: "stroke",
                type: "rounded"
            }, onClick: this.handleNextClick })))));
    }
}, [0, "month-navigator", {
        "currentMonth": [16],
        "showArrows": [4, "show-arrows"],
        "onChange": [16]
    }]);
function defineCustomElement() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["month-navigator", "dga-button", "dga-icon"];
    components.forEach(tagName => { switch (tagName) {
        case "month-navigator":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, MonthNavigator);
            }
            break;
        case "dga-button":
            if (!customElements.get(tagName)) {
                defineCustomElement$2();
            }
            break;
        case "dga-icon":
            if (!customElements.get(tagName)) {
                defineCustomElement$1();
            }
            break;
    } });
}

export { MonthNavigator as M, defineCustomElement as d };

//# sourceMappingURL=p-921307d1.js.map