import { h } from "@stencil/core";
/**
 * @exampleComponent limel-example-banner-basic
 * @slot buttons - Buttons to show in the banner
 */
export class Banner {
    constructor() {
        this.isOpen = false;
    }
    /**
     * Open the banner
     */
    async open() {
        this.isOpen = true;
    }
    /**
     * Close the banner
     */
    async close() {
        this.isOpen = false;
    }
    render() {
        return (h("div", { key: '7aa9f02c71a64eebf5afcbff9ef819addcd44217', class: `lime-banner ${this.isOpen ? 'lime-banner--open' : ''}` }, h("div", { key: 'c381d72fd3cec7bb82a244a2a38ba410870cfd9e', class: "lime-banner__surface" }, h("div", { key: '307b2422ac6391bb1a2afc4764c65211567ad935', class: "lime-banner__content" }, h("div", { key: '5f072a6979f5065d11472ae14cf1ad3171b0375e', class: "icon-message" }, this.renderIcon(), h("div", { key: '204b58d8a3d3a201aee68e8e5395bd8fa583a42e' }, this.message)), h("div", { key: '2637122052a4b16ed79b0cd3ac53841fea95ee64', class: "lime-banner__actions" }, h("slot", { key: '5950d12303938141671578dff146caf2434b3614', name: "buttons" }))))));
    }
    renderIcon() {
        if (!this.icon) {
            return;
        }
        return (h("div", { class: "lime-banner__icon" }, h("limel-icon", { name: this.icon, badge: true, size: "large" })));
    }
    static get is() { return "limel-banner"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["banner.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["banner.css"]
        };
    }
    static get properties() {
        return {
            "message": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "The text to show on the banner."
                },
                "getter": false,
                "setter": false,
                "reflect": true,
                "attribute": "message"
            },
            "icon": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "IconName",
                    "resolved": "string",
                    "references": {
                        "IconName": {
                            "location": "import",
                            "path": "../../global/shared-types/icon.types",
                            "id": "src/global/shared-types/icon.types.ts::IconName",
                            "referenceLocation": "IconName"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Set icon for the banner"
                },
                "getter": false,
                "setter": false,
                "reflect": true,
                "attribute": "icon"
            }
        };
    }
    static get states() {
        return {
            "isOpen": {}
        };
    }
    static get methods() {
        return {
            "open": {
                "complexType": {
                    "signature": "() => Promise<void>",
                    "parameters": [],
                    "references": {
                        "Promise": {
                            "location": "global",
                            "id": "global::Promise"
                        }
                    },
                    "return": "Promise<void>"
                },
                "docs": {
                    "text": "Open the banner",
                    "tags": []
                }
            },
            "close": {
                "complexType": {
                    "signature": "() => Promise<void>",
                    "parameters": [],
                    "references": {
                        "Promise": {
                            "location": "global",
                            "id": "global::Promise"
                        }
                    },
                    "return": "Promise<void>"
                },
                "docs": {
                    "text": "Close the banner",
                    "tags": []
                }
            }
        };
    }
}
