import { Host, h } from "@stencil/core";
export class SpwCardSubtags {
    constructor() {
        /** Type de variante de tags */
        this.variant = 'link';
    }
    componentWillLoad() {
        this.applyVariantToChildren();
    }
    applyVariantToChildren() {
        requestAnimationFrame(() => {
            const variantClass = `--${this.variant}`;
            const contentElements = this.el.querySelectorAll('spw-card-subtag-item');
            contentElements.forEach(element => {
                element.classList.add(variantClass);
                if (this.el.classList.contains('--highlighted')) {
                    element.classList.add('--highlighted');
                }
            });
        });
    }
    get elementClass() {
        return {
            'spw-card-subtags': true,
            [`spw-card-subtags--${this.variant}`]: true,
        };
    }
    render() {
        return (h(Host, { key: '932526d39865c60a98dc2c5b3a725d08116a8435' }, h("div", { key: '5127d371be9c14528be9afa1badbd1278b1ae40c', class: this.elementClass }, h("slot", { key: '06cb3b41922d0f2a4bcc1dee186a01b515581144' }))));
    }
    static get is() { return "spw-card-subtags"; }
    static get originalStyleUrls() {
        return {
            "$": ["spw-card-subtags.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["spw-card-subtags.css"]
        };
    }
    static get properties() {
        return {
            "variant": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "'link' | 'tag'",
                    "resolved": "\"link\" | \"tag\"",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "Type de variante de tags"
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "variant",
                "defaultValue": "'link'"
            }
        };
    }
    static get elementRef() { return "el"; }
}
