import { h } from "@stencil/core";
/**
 * @exampleComponent limel-example-banner
 * @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: '3b45f4fd3cb1d3334a3b4161e2393b387a698115', class: `lime-banner ${this.isOpen ? 'lime-banner--open' : ''}` }, h("div", { key: 'a80b578b911600ba92a2a2be77b520cecced449c', class: "lime-banner__surface" }, h("div", { key: '518f4bad3877cc35c0fdb486c0f62d2795676e93', class: "lime-banner__content" }, h("div", { key: '1b8bc8d8474891f2f500f49da26e6c6b14a4f960', class: "icon-message" }, this.renderIcon(), h("div", { key: 'dc9bca9d54be61fba5724b63eec2290b257e6857' }, this.message)), h("div", { key: 'e44ac4f418d71e863edb078823ee0a82c4deecca', class: "lime-banner__actions" }, h("slot", { key: '6fdea4e8efeca5b36028b22ea9fcac3e95ed80e8', 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": "string",
                    "resolved": "string",
                    "references": {}
                },
                "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": []
                }
            }
        };
    }
}
