/*!
 * Crafted with ❤ by Salla
 */
import { h, Host } from "@stencil/core";
import Inbox from "../../assets/svg/inbox.svg";
/**
 * @slot title - The primary content of the placeholder.
 * @slot description - Additional content displayed below the title.
 */
export class SallaPlaceholder {
    constructor() {
        this.translationLoaded = false;
        /**
         * Custom icon to display, defaults to [`Inbox`], can be any valid svg icon or inline element with font icon
         */
        this.icon = Inbox;
        /**
         * Defines the alignment of contents. Defaults to [`left`]
         */
        this.alignment = 'left';
        /**
          * The size of the icon. Defaults to [`md`] = 45px for font icon & width/height: 3.5rem for svg icon
          */
        this.iconSize = 'md';
        salla.lang.onLoaded(() => {
            this.translationLoaded = true;
        });
    }
    alignmentClass() {
        return {
            's-placeholder-wrapper': true,
            's-placeholder-align-left': this.alignment == 'left',
            's-placeholder-align-center': this.alignment == 'center',
            's-placeholder-align-right': this.alignment == 'right',
        };
    }
    render() {
        return (h(Host, { key: 'c036c6655683dd28dc1fe108a0c9f18c41d4dab2', class: this.alignmentClass() }, h("div", { key: '8a344197473899bfce235707a0a4b586b09f7586', class: `s-placeholder-icon s-placeholder-icon-${this.iconSize}`, innerHTML: this.icon }), h("div", { key: '84c667eedacea750f761c0c650615c63812875ca', class: "s-placeholder-title" }, h("slot", { key: '4b59c67b550d5b4fb818007f0061b7648984c13c', name: 'title' }, h("span", { key: 'aec395c1624cc78932d4bddc2aaf936d6c300143' }, salla.lang.get('common.elements.no_options')))), h("div", { key: 'de0e5e440393992977e73d457df7c537cb2c1c8a', class: "s-placeholder-description" }, h("slot", { key: '4e85b215cd7255ee2ec7bd18913ea9f4709adaef', name: 'description' }, h("span", { key: '2c6746373095d09ef5cd19c2015cb240545d4ef9' }, salla.lang.get('common.errors.empty_results'))))));
    }
    static get is() { return "salla-placeholder"; }
    static get originalStyleUrls() {
        return {
            "$": ["salla-placeholder.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["salla-placeholder.css"]
        };
    }
    static get properties() {
        return {
            "icon": {
                "type": "string",
                "attribute": "icon",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Custom icon to display, defaults to [`Inbox`], can be any valid svg icon or inline element with font icon"
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "defaultValue": "Inbox"
            },
            "alignment": {
                "type": "string",
                "attribute": "alignment",
                "mutable": false,
                "complexType": {
                    "original": "'left' | 'center' | 'right'",
                    "resolved": "\"center\" | \"left\" | \"right\"",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Defines the alignment of contents. Defaults to [`left`]"
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "defaultValue": "'left'"
            },
            "iconSize": {
                "type": "string",
                "attribute": "icon-size",
                "mutable": false,
                "complexType": {
                    "original": "'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | 'xxxl'",
                    "resolved": "\"lg\" | \"md\" | \"sm\" | \"xl\" | \"xs\" | \"xxl\" | \"xxxl\"",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "The size of the icon. Defaults to [`md`] = 45px for font icon & width/height: 3.5rem for svg icon"
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "defaultValue": "'md'"
            }
        };
    }
    static get states() {
        return {
            "translationLoaded": {}
        };
    }
}
