import { h } from "@stencil/core";
export class GenericModal {
    handleClose() {
        this.close.emit();
    }
    handleKeyDown(event) {
        if (event.key === 'Escape') {
            this.handleClose();
        }
    }
    render() {
        return (h("div", { key: '3f0791f55dc7b5e334cfe9a2c7fa2a6dd4c5bb75', class: "modal", onKeyDown: this.handleKeyDown.bind(this) }, h("div", { key: 'bf99068ffad9d43171f84142bd4a4b1c592cb3cf', class: "modal-content" }, h("div", { key: 'b372585b5a0310469320ece6a50baa8900ae9b6a', class: "modal-header" }, h("span", { key: 'e6827e0e807c5e95035f119b7f61ff581a91ff19', class: "close", onClick: this.handleClose.bind(this) }, "\u2715"), h("h2", { key: '2a181abdc50366893302b91487898f49771ccd1b' }, this.modalTitle), this.modalSubtitle && h("h4", { key: '15bcf135240d9f70eb8cba6e1cd2e794e2f9be83' }, this.modalSubtitle)), this.body)));
    }
    static get is() { return "generic-modal"; }
    static get originalStyleUrls() {
        return {
            "$": ["./generic-modal.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["generic-modal.css"]
        };
    }
    static get properties() {
        return {
            "body": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "IGenericModalProps['body']",
                    "resolved": "VNode",
                    "references": {
                        "IGenericModalProps": {
                            "location": "import",
                            "path": "./generic-modal.types",
                            "id": "src/common/generic-modal/generic-modal.types.ts::IGenericModalProps"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false
            },
            "modalTitle": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "IGenericModalProps['modalTitle']",
                    "resolved": "VNode | string",
                    "references": {
                        "IGenericModalProps": {
                            "location": "import",
                            "path": "./generic-modal.types",
                            "id": "src/common/generic-modal/generic-modal.types.ts::IGenericModalProps"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "attribute": "modal-title",
                "reflect": false
            },
            "modalSubtitle": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "IGenericModalProps['modalSubtitle']",
                    "resolved": "VNode | string",
                    "references": {
                        "IGenericModalProps": {
                            "location": "import",
                            "path": "./generic-modal.types",
                            "id": "src/common/generic-modal/generic-modal.types.ts::IGenericModalProps"
                        }
                    }
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "attribute": "modal-subtitle",
                "reflect": false
            }
        };
    }
    static get events() {
        return [{
                "method": "close",
                "name": "close",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "complexType": {
                    "original": "any",
                    "resolved": "any",
                    "references": {}
                }
            }];
    }
}
//# sourceMappingURL=generic-modal.js.map
