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: '9ee99ca717e8255bdd74b0fc98b6483fade9818e' }, h("div", { key: 'ce0617f643dd7a96aee2ef3e5d513131c70771d7', class: "background-overlay", onClick: e => this.handleDismiss(e) }, h("div", { key: '8db443f0bb797efd3980b39af012f675f73cd407', class: "dialog" }, h("slot", { key: '4f46b7ca284f43713dcfe01de2091174756054a9', name: "heading" }, h("div", { key: 'a8194fb0386d4b776952a8d00f5bb07dc868f966', class: "heading" })), h("slot", { key: 'c7907e0fa70887f88b5324e615fc4f12de513ff7', name: "content" }, h("div", { key: '045cfc5fc69e580a7822ff067e377d16226ad9a9', class: "content" })), h("slot", { key: 'b6bf85d6c322b09f9aec7287dc1703611e756957', name: "footer" }, h("div", { key: '6e8e1a053746f612e219373e6fe6aeb263f45acc', class: "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
