import { h, Host } from "@stencil/core";
import { TagMediaIcon } from "./tag-media-icon.enum";
/**
 *
 * @enums myEnum - tag-media-myEnum.enum.ts
 *
 * @swedishName Mediatagg
 */
export class TagMedia {
    constructor() {
        this.afText = undefined;
        this.afIcon = TagMediaIcon.NEWS;
    }
    get tagIcon() {
        if (this.afIcon === TagMediaIcon.NEWS) {
            return h("digi-icon-news", { class: "digi-tag-media__icon" });
        }
        if (this.afIcon === TagMediaIcon.PLAYLIST) {
            return (h("digi-icon-list-ul", { class: "digi-tag-media__icon" }));
        }
        if (this.afIcon === TagMediaIcon.PODCAST) {
            return h("digi-icon-pod", { class: "digi-tag-media__icon" });
        }
        if (this.afIcon === TagMediaIcon.FILM) {
            return (h("digi-icon-online-video", { class: "digi-tag-media__icon" }));
        }
        if (this.afIcon === TagMediaIcon.WEBTV) {
            return (h("digi-icon-online-computervideo", { class: "digi-tag-media__icon" }));
        }
        if (this.afIcon === TagMediaIcon.WEBINAR) {
            return (h("digi-icon-webinar", { class: "digi-tag-media__icon" }));
        }
        return h("digi-icon-news", { class: "digi-tag-media__icon" });
    }
    render() {
        return (h(Host, { key: '2b1b0e8155f24a242c3a23489a12b6df92879cb2' }, h("div", { key: '1ce30677ca3a5e6d923c06776262773eefa1d7a9', class: {
                'digi-tag-media': true
            } }, this.tagIcon, h("span", { key: 'd67de1beeba5532df63ef59b5aad80728a10f27c', class: "digi-tag-media__text" }, this.afText))));
    }
    static get is() { return "digi-tag-media"; }
    static get encapsulation() { return "scoped"; }
    static get originalStyleUrls() {
        return {
            "$": ["tag-media.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["tag-media.css"]
        };
    }
    static get properties() {
        return {
            "afText": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": true,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Set the tag text."
                        }],
                    "text": "S\u00E4tter taggens text."
                },
                "getter": false,
                "setter": false,
                "attribute": "af-text",
                "reflect": false
            },
            "afIcon": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "TagMediaIcon",
                    "resolved": "TagMediaIcon.FILM | TagMediaIcon.NEWS | TagMediaIcon.PLAYLIST | TagMediaIcon.PODCAST | TagMediaIcon.WEBINAR | TagMediaIcon.WEBTV",
                    "references": {
                        "TagMediaIcon": {
                            "location": "import",
                            "path": "./tag-media-icon.enum",
                            "id": "src/components/_tag/tag-media/tag-media-icon.enum.ts::TagMediaIcon"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Sets a specific icon for the tag."
                        }],
                    "text": "S\u00E4tter en specifik icon f\u00F6r taggen."
                },
                "getter": false,
                "setter": false,
                "attribute": "af-icon",
                "reflect": false,
                "defaultValue": "TagMediaIcon.NEWS"
            }
        };
    }
    static get elementRef() { return "hostElement"; }
}
