import { r as registerInstance, c as createEvent, h, H as Host } from './index-4d3658f6.js';
import { s as stopEventBubbling } from './form-input-56444bfd.js';
import { B as BEM } from './bem-8c7d2eb0.js';
import './helpers-b53ad333.js';
import './browser-a623d3a0.js';
import './icons.constant-47b0ca12.js';
import './config.utils-8fe5be10.js';

const DateCalendar = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.balSelectDay = createEvent(this, "balSelectDay", 7);
        this.onClick = (ev, selectedDate) => {
            if (!this.disabled) {
                this.balSelectDay.emit(selectedDate);
            }
            else {
                stopEventBubbling(ev);
            }
        };
        this.day = undefined;
        this.month = undefined;
        this.year = undefined;
        this.isoDate = undefined;
        this.fullDate = undefined;
        this.selected = false;
        this.today = false;
        this.disabled = false;
    }
    render() {
        const block = BEM.block('date-calendar-cell');
        return (h(Host, { class: Object.assign(Object.assign(Object.assign(Object.assign({}, block.class()), block.modifier('today').class(!this.disabled && this.today)), block.modifier('selected').class(!this.disabled && this.selected)), block.modifier('disabled').class(this.disabled === true)), tabIndex: -1, type: "button", role: "button", "aria-label": this.fullDate, "aria-selected": this.selected ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', title: this.fullDate, onClick: (ev) => this.onClick(ev, this.isoDate) }, h("time", { dateTime: this.isoDate }, this.day)));
    }
};

export { DateCalendar as bal_date_calendar_cell };
