import { Host, h } from "@stencil/core";
import i18next from "i18next";
export class EzpStatus {
    constructor() {
        /**
         *
         * Properties
         *
         */
        this.description = 'Description';
        this.processing = false;
        /**
         *
         * Private methods
         *
         */
        this.handleCancel = () => {
            this.statusCancel.emit(this.instance);
        };
        this.handleClose = () => {
            this.statusClose.emit(this.instance);
        };
        this.handleRetry = () => {
            this.statusRetry.emit(this.instance);
        };
    }
    /**
     *
     * Lifecycle methods
     *
     */
    componentWillLoad() { }
    /**
     *
     * Render method
     *
     */
    render() {
        return (h(Host, { key: 'e04ad6bd97cdcc28cd5b0bdf2d2ff6a33ceab129' }, h("div", { key: '4f725c25965dc80f1d1e68c0a6611e6b654853e4', id: "box" }, this.processing ? (h("svg", { id: "indicator", viewBox: "0 0 42 42", xmlns: "http://www.w3.org/2000/svg" }, h("circle", { id: "track", cx: "21", cy: "21", r: "18" }), h("circle", { id: "value", cx: "21", cy: "21", r: "18" }))) : this.icon ? (h("ezp-icon", { name: this.icon, framed: true })) : null, h("ezp-label", { key: '7ec34d3592bee4684d4907f630ae0b8220d87f5f', id: "description", level: "tertiary", weight: "strong", text: this.description }), (this.cancel || this.close || this.retry) && (h("div", { key: 'd726baeb1e9c7b3e8fa60a2801183e33fbaccc03', id: "footer" }, this.cancel && (h("ezp-text-button", { key: 'c2d85e5dd6506298e444691bd90644bc29fcbcc3', level: "secondary", small: true, onClick: this.handleCancel, label: typeof this.cancel === 'string'
                ? this.cancel
                : i18next.t('button_actions.cancel') })), this.close && (h("ezp-text-button", { key: 'ac07d54b361c71d1bc2697f4b3477056a6d81cf3', level: this.retry ? 'secondary' : 'primary', small: true, onClick: this.handleClose, label: typeof this.close === 'string' ? this.close : i18next.t('button_actions.close') })), this.retry && (h("ezp-text-button", { key: '4deb60cd315e298b822bb0ba74eed94776f20c82', level: "primary", small: true, onClick: this.handleRetry, label: typeof this.retry === 'string' ? this.retry : i18next.t('button_actions.retry') })))))));
    }
    static get is() { return "ezp-status"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["ezp-status.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["ezp-status.css"]
        };
    }
    static get properties() {
        return {
            "description": {
                "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": "description",
                "defaultValue": "'Description'"
            },
            "processing": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "processing",
                "defaultValue": "false"
            },
            "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"
            },
            "icon": {
                "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"
            },
            "cancel": {
                "type": "any",
                "mutable": false,
                "complexType": {
                    "original": "string | boolean",
                    "resolved": "boolean | string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "cancel"
            },
            "close": {
                "type": "any",
                "mutable": false,
                "complexType": {
                    "original": "string | boolean",
                    "resolved": "boolean | string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "close"
            },
            "retry": {
                "type": "any",
                "mutable": false,
                "complexType": {
                    "original": "string | boolean",
                    "resolved": "boolean | string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "retry"
            }
        };
    }
    static get events() {
        return [{
                "method": "statusCancel",
                "name": "statusCancel",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": "\nEvents"
                },
                "complexType": {
                    "original": "any",
                    "resolved": "any",
                    "references": {}
                }
            }, {
                "method": "statusClose",
                "name": "statusClose",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "complexType": {
                    "original": "any",
                    "resolved": "any",
                    "references": {}
                }
            }, {
                "method": "statusRetry",
                "name": "statusRetry",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "complexType": {
                    "original": "any",
                    "resolved": "any",
                    "references": {}
                }
            }];
    }
}
