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: '270be447ea798d42275ea9ac4e2ecc4a33251233' }, h("div", { key: '8c9b1a41e6dea1b1910c296069f4cfce3779e704', class: "background-overlay", onClick: e => this.handleDismiss(e) }, h("div", { key: '486f221c4c6c7fa934536b17757f8427ddfa0e85', class: "dialog" }, h("slot", { key: 'b2814fca9288d6a5de00cb11b24b6a7ff596546b', name: "heading" }, h("div", { key: '0ec2f776317e5a702f160e45bfe872264b82becc', class: "heading" }, "Title")), h("slot", { key: '008cac1775d418d930052a4cd32eb816ddf3755a', name: "content" }, h("div", { key: '670e9177b5586aed4401763ec662b07388735135', class: "content" }, "Content")), h("slot", { key: '3c731fec8083aab7966b5a478bf64c78d95ac8da', name: "footer" }, h("div", { key: '727b66e86fafbad600ed11d7930efe5d3cd8d08f', 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
