import { h } from "@stencil/core";
export class Avatar {
    size = 'default';
    shape = 'circle';
    src;
    icon;
    alt;
    get sizePx() {
        const map = { small: '28px', default: '36px', large: '44px' };
        return typeof this.size === 'number' ? `${this.size}px` : map[this.size];
    }
    render() {
        return (h("span", { key: 'e8df0341e82865acbcdd25572df385d805172eac', class: { 'hb-avatar': true, [`hb-avatar--${this.shape}`]: true }, style: { width: this.sizePx, height: this.sizePx, fontSize: `calc(${this.sizePx} * 0.45)` } }, this.src ? h("img", { src: this.src, alt: this.alt }) : this.icon ? h("span", null, this.icon) : h("slot", null)));
    }
    static get is() { return "hb-avatar"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["avatar.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["avatar.css"]
        };
    }
    static get properties() {
        return {
            "size": {
                "type": "any",
                "mutable": false,
                "complexType": {
                    "original": "'small' | 'default' | 'large' | number",
                    "resolved": "\"default\" | \"large\" | \"small\" | number",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "attribute": "size",
                "reflect": false,
                "defaultValue": "'default'"
            },
            "shape": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "'circle' | 'square'",
                    "resolved": "\"circle\" | \"square\"",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "attribute": "shape",
                "reflect": false,
                "defaultValue": "'circle'"
            },
            "src": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "attribute": "src",
                "reflect": false
            },
            "icon": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "attribute": "icon",
                "reflect": false
            },
            "alt": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "attribute": "alt",
                "reflect": false
            }
        };
    }
}
//# sourceMappingURL=Avatar.js.map
