import { h, Host } from "@stencil/core";
export class ModalHeader {
    constructor() {
        this.closeHandler = () => {
            if (this.parentModal) {
                this.parentModal.dismiss(undefined, 'model-close');
            }
        };
    }
    get parentModal() {
        return this.el.closest('bal-modal');
    }
    render() {
        var _a;
        return (h(Host, { key: 'abcecb921453f0ec9ff5b989517ca1b1406daab0', class: "bal-modal__header" }, h("div", { key: '6e4606402740673c455e98c4f4160e17f82d0435', class: "bal-modal__header__title" }, h("bal-heading", { key: 'bf7df5c6677354f5c53b75d77fb8b7f23859f267', level: "h2", space: "none" }, h("slot", { key: '78648da85f2751f9aac04544083d62ba088beeae' }))), ((_a = this.parentModal) === null || _a === void 0 ? void 0 : _a.isClosable) ? (h("bal-close", { class: "bal-modal__header__close data-test-modal-close", onClick: this.closeHandler })) : ('')));
    }
    static get is() { return "bal-modal-header"; }
    static get elementRef() { return "el"; }
}
