import { Host, h } from "@stencil/core";
import i18next from "i18next";
export class EzpDialog {
    constructor() {
        this.action = i18next.t('button_actions.close');
        this.iconSize = 'large';
        this.iconFramed = true;
        /**
         *
         * Private methods
         *
         */
        this.handleClose = () => {
            this.dialogClose.emit(this.instance);
        };
        this.handleAction = () => {
            this.dialogAction.emit(this.instance);
        };
    }
    /**
     *
     * Lifecycle methods
     *
     */
    componentWillLoad() { }
    /**
     *
     * Render method
     *
     */
    render() {
        return (h(Host, { key: 'e73ad3d56827d5ecf36f92052599bfeb3bc463f6' }, h("div", { key: '3c71c2a729a1c2b0afa50778b0195961e788e1e9', id: "box" }, h("div", { key: '350b2daeaf8e6fcdc9194c5355358ba117158d3d', id: "header" }, h("ezp-icon-button", { key: 'd9a23a475ef6c88270add722cf97ec7b32510f7f', level: "tertiary", icon: "close", type: "button", onClick: this.handleClose })), h("div", { key: 'd14762d7b761244428c2903c9efce1a0b9130adf', id: "body" }, this.iconName && (h("ezp-icon", { key: 'cd77a5e3f99aad37adb74bc0a3e824dcc498ccd4', name: this.iconName, size: this.iconSize, framed: this.iconFramed })), h("div", { key: '8c9ad16c863d1ca02658d9c2d1c50d4b5ee487f5', id: "text" }, h("ezp-label", { key: '97d2ff06ca2b73e1729b0abb441bca42384dcb07', text: this.heading, weight: "heavy" }), h("ezp-label", { key: '0f77905b89ecd61489e1019568bbcba8a8345eb2', text: this.description }))), h("div", { key: '6143abdde9159ac3df1f76511f617e0ad2b7f9fe', id: "footer" }, h("ezp-text-button", { key: '12cb509c048b6a9e2c9df34c0abc25e094e6f3f9', type: "button", level: "primary", onClick: this.handleAction, label: this.action })))));
    }
    static get is() { return "ezp-dialog"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["ezp-dialog.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["ezp-dialog.css"]
        };
    }
    static get properties() {
        return {
            "heading": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "\nProperties"
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "heading"
            },
            "description": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "description"
            },
            "action": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "action",
                "defaultValue": "i18next.t('button_actions.close')"
            },
            "iconName": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "IconNameTypes",
                    "resolved": "\"account\" | \"checkmark\" | \"checkmark-alt\" | \"close\" | \"color\" | \"copies\" | \"dark\" | \"drag-drop\" | \"duplex\" | \"exclamation-mark\" | \"expand\" | \"height\" | \"help\" | \"light\" | \"logo\" | \"logout\" | \"menu\" | \"minus\" | \"orientation\" | \"paper_range\" | \"plus\" | \"printer\" | \"quality\" | \"question-mark\" | \"size\" | \"system\" | \"trays\" | \"width\"",
                    "references": {
                        "IconNameTypes": {
                            "location": "import",
                            "path": "../../shared/types",
                            "id": "src/shared/types.d.ts::IconNameTypes",
                            "referenceLocation": "IconNameTypes"
                        }
                    }
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "icon-name"
            },
            "iconSize": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "IconSizeTypes",
                    "resolved": "\"huge\" | \"large\" | \"normal\"",
                    "references": {
                        "IconSizeTypes": {
                            "location": "import",
                            "path": "../../shared/types",
                            "id": "src/shared/types.d.ts::IconSizeTypes",
                            "referenceLocation": "IconSizeTypes"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "icon-size",
                "defaultValue": "'large'"
            },
            "iconFramed": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "icon-framed",
                "defaultValue": "true"
            },
            "instance": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "instance"
            }
        };
    }
    static get events() {
        return [{
                "method": "dialogClose",
                "name": "dialogClose",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": "\nEvents"
                },
                "complexType": {
                    "original": "any",
                    "resolved": "any",
                    "references": {}
                }
            }, {
                "method": "dialogAction",
                "name": "dialogAction",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "complexType": {
                    "original": "any",
                    "resolved": "any",
                    "references": {}
                }
            }];
    }
}
