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: 'b1f81ae1a9d9a70d5a1f1a499a9a3bfcbb387af5', class: "modal", onKeyDown: this.handleKeyDown.bind(this) }, h("div", { key: '46212a097bc52cde691841181001f5d854885c18', class: "modal-content" }, h("div", { key: 'fb3f3ab53a3f19530016c7763fd6c53ef7e0e43d', class: "modal-header" }, h("span", { key: '19d5083d3fd0578c0136a907ee186c0835f82338', class: "close", onClick: this.handleClose.bind(this) }, "\u2715"), h("h2", { key: '05cd720fc5c565ea6dadcf3534b3955ea43366b0' }, this.modalTitle), this.modalSubtitle && h("h4", { key: '0f1967b5ed39209e7c42223c41eb19b712feb7f5' }, this.modalSubtitle)), this.body)));
    }
    static get is() { return "mvx-generic-modal"; }
    static get originalStyleUrls() {
        return {
            "$": ["./generic-modal.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["generic-modal.css"]
        };
    }
    static get properties() {
        return {
            "body": {
                "type": "unknown",
                "attribute": "body",
                "mutable": false,
                "complexType": {
                    "original": "IGenericModalProps['body']",
                    "resolved": "VNode",
                    "references": {
                        "IGenericModalProps": {
                            "location": "import",
                            "path": "./generic-modal.types",
                            "id": "src/components/common/generic-modal/generic-modal.types.ts::IGenericModalProps"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false
            },
            "modalTitle": {
                "type": "string",
                "attribute": "modal-title",
                "mutable": false,
                "complexType": {
                    "original": "IGenericModalProps['modalTitle']",
                    "resolved": "VNode | string",
                    "references": {
                        "IGenericModalProps": {
                            "location": "import",
                            "path": "./generic-modal.types",
                            "id": "src/components/common/generic-modal/generic-modal.types.ts::IGenericModalProps"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "modalSubtitle": {
                "type": "string",
                "attribute": "modal-subtitle",
                "mutable": false,
                "complexType": {
                    "original": "IGenericModalProps['modalSubtitle']",
                    "resolved": "VNode | string",
                    "references": {
                        "IGenericModalProps": {
                            "location": "import",
                            "path": "./generic-modal.types",
                            "id": "src/components/common/generic-modal/generic-modal.types.ts::IGenericModalProps"
                        }
                    }
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "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
