import { h, Host } from "@stencil/core";
/**
 * Display a simple dialog where the contents are provided via slots.
 */
export class VerdocsDialog {
    // We need a separate event handler for clicking the background because it can
    // receive events "through" other child components
    handleDismiss(e) {
        var _a;
        if (e.target.className === 'background-overlay') {
            e.preventDefault();
            (_a = this.exit) === null || _a === void 0 ? void 0 : _a.emit();
        }
    }
    render() {
        return (h(Host, { key: 'd35ecf18632cd1fadd0d09f3620f70caa48e7e59' }, h("div", { key: '8be20513940431141c5081a1707fa476610e1012', class: "background-overlay", onClick: e => this.handleDismiss(e) }, h("div", { key: '54bd01f44dff81823f2e55fb123bb9c7f3426f5b', class: "dialog" }, h("slot", { key: '1af4b32c31c73b214e90358aaa49060dfb6d095f', name: "heading" }, h("div", { key: 'f6515a3b0fe401ab909dca565241e907233945e6', class: "heading" }, "Title")), h("slot", { key: '230fac7e4f60901bdbb4f147dc2bc8f69e84b48a', name: "content" }, h("div", { key: '0c015df8c5bd2d07268ea301477b8c4b5736fabe', class: "content" }, "Content")), h("slot", { key: 'cdee938000347d04a0c74b35643067925cddc0e1', name: "footer" }, h("div", { key: '4e930b83268f0e8432352048e157f7a89e312086', class: "footer" }, "Footer"))))));
    }
    static get is() { return "verdocs-dialog"; }
    static get originalStyleUrls() {
        return {
            "$": ["verdocs-dialog.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["verdocs-dialog.css"]
        };
    }
    static get events() {
        return [{
                "method": "exit",
                "name": "exit",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": "Event fired when the dialog is dismissed by clicking the background overlay."
                },
                "complexType": {
                    "original": "any",
                    "resolved": "any",
                    "references": {}
                }
            }];
    }
}
//# sourceMappingURL=verdocs-dialog.js.map
