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: 'db89d061e5d4b2aaef751621cfb32a332034ceed' }, h("div", { key: 'fb928bd8fda58c5c9c5bbed662c055dc00db5f6b', class: "background-overlay", onClick: e => this.handleDismiss(e) }, h("div", { key: '25c82f341ea3437777b69d2ef2578eb76f2bd566', class: "dialog" }, h("slot", { key: 'e3a0d4c6e3612203617fe40d192f0ba6282b84a6', name: "title" }, h("div", { key: '18b4ce4bd1a48cf9911756bc970c17580e3d149e', class: "heading" }, "Please Confirm")), h("div", { key: '638f57aba3dd14a91072aee3a80cc9038dbf6247', class: "content" }, h("slot", { key: 'b75d736e0f8d89ae080a9238ef570eab5b79ff83' }))))));
    }
    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
