import { Host, h } from "@stencil/core";
export class EzpBackdrop {
    constructor() {
        this.visible = true;
    }
    handleClick() {
        this.visible = false;
        this.backdropHideStart.emit();
    }
    listenAnimationEnd() {
        if (!this.visible) {
            this.backdropHideEnd.emit();
        }
    }
    render() {
        return h(Host, { key: '7795cb74eefda5cdc979c97e4c491cbe9976c019', class: { hide: !this.visible }, onClick: () => this.handleClick() });
    }
    static get is() { return "ezp-backdrop"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["ezp-backdrop.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["ezp-backdrop.css"]
        };
    }
    static get properties() {
        return {
            "visible": {
                "type": "boolean",
                "mutable": true,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "visible",
                "defaultValue": "true"
            }
        };
    }
    static get events() {
        return [{
                "method": "backdropHideStart",
                "name": "backdropHideStart",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "complexType": {
                    "original": "any",
                    "resolved": "any",
                    "references": {}
                }
            }, {
                "method": "backdropHideEnd",
                "name": "backdropHideEnd",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "complexType": {
                    "original": "any",
                    "resolved": "any",
                    "references": {}
                }
            }];
    }
    static get elementRef() { return "component"; }
    static get listeners() {
        return [{
                "name": "animationend",
                "method": "listenAnimationEnd",
                "target": undefined,
                "capture": false,
                "passive": false
            }];
    }
}
