import { h, Host } from "@stencil/core";
export class SpwAvatar {
    constructor() {
        /** Forme de l'avatar */
        // @Prop() shape: 'rounded' | 'squared' = 'rounded';
        /** Taille de l'avatar */
        this.size = 'medium';
        /** Si true, ajoute un cursor pointer et un effet hover */
        this.clickable = false;
    }
    get hostClass() {
        return {
            'spw-avatar': true,
            // [`spw-avatar--${this.shape}`]: true,
            'spw-avatar--rounded': true,
            [`spw-avatar--${this.size}`]: true,
            'spw-avatar--has-image': !!this.image,
            'spw-avatar--clickable': this.clickable,
        };
    }
    get avatarStyle() {
        if (this.image) {
            return {
                'background-image': `url(${this.image})`,
            };
        }
        return {};
    }
    render() {
        return (h(Host, { key: '40af33cae43b3ed1738c6df5869f7e9255405a21', class: this.hostClass, style: this.avatarStyle, role: "img", "aria-label": this.accAriaLabel || this.initials || 'Avatar' }, !this.image && this.initials && h("span", { key: '359653844302a7e37165ea9cac62bb8009524104', class: "spw-avatar__initials" }, this.initials), this.bubble && h("span", { key: '6a711127f112fd4b150f57911773fc64495625e8', class: "spw-avatar__bubble" }, this.bubble)));
    }
    static get is() { return "spw-avatar"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["spw-avatar.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["spw-avatar.css"]
        };
    }
    static get properties() {
        return {
            "size": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "'small' | 'medium' | 'large'",
                    "resolved": "\"large\" | \"medium\" | \"small\"",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Taille de l'avatar"
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "size",
                "defaultValue": "'medium'"
            },
            "image": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "URL de l'image de fond"
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "image"
            },
            "initials": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "Initiales \u00E0 afficher (si pas d'image)"
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "initials"
            },
            "bubble": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "Contenu de la bubble de notification"
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "bubble"
            },
            "clickable": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "Si true, ajoute un cursor pointer et un effet hover"
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "clickable",
                "defaultValue": "false"
            },
            "accAriaLabel": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "Label d'accessibilit\u00E9"
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "acc-aria-label"
            }
        };
    }
}
