// import { UserIcon } from '@hugeicons/react-pro';
import { h } from "@stencil/core";
export class DgaAvatar {
    constructor() {
        this.type = 'icon';
        this.size = 32;
        this.square = false;
        this.border = false;
        this.text = 'AB';
        this.imgUrl = '/assets/avatar-img.png';
        this.alt = '';
    }
    renderChildComponent() {
        var _a, _b, _c, _d;
        if (this.type === 'initials')
            return h("span", { class: "dga-avatar__text" }, this.text);
        if (this.type === 'image')
            return h("img", { class: "dga-avatar__img", src: this.imgUrl, alt: this.alt });
        if (this.type === 'icon')
            return (h("div", { class: "dga-avatar__icon" }, h("dga-icon", { icon: ((_a = this.icon) === null || _a === void 0 ? void 0 : _a.name) || "", variant: (_b = this.icon) === null || _b === void 0 ? void 0 : _b.variant, type: (_c = this.icon) === null || _c === void 0 ? void 0 : _c.type, color: (_d = this.icon) === null || _d === void 0 ? void 0 : _d.color })));
    }
    render() {
        return (h("div", { key: 'e77346a851de430fba13516fe309946858814adf', class: {
                'dga-avatar': true,
                [`dga-avatar--${this.type}`]: true,
                [`dga-avatar--${this.size}`]: true,
                'dga-avatar--square': this.square,
                'dga-avatar--border': this.border,
            } }, this.renderChildComponent()));
    }
    static get is() { return "dga-avatar"; }
    static get originalStyleUrls() {
        return {
            "$": ["dga-avatar.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["dga-avatar.css"]
        };
    }
    static get properties() {
        return {
            "type": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "AvatarType",
                    "resolved": "\"icon\" | \"image\" | \"initials\"",
                    "references": {
                        "AvatarType": {
                            "location": "local",
                            "path": "/home/mamoud/Documents/temp/components/platform-code-cross-platform-storybook/packages/core/src/components/dga-avatar/dga-avatar.tsx",
                            "id": "src/components/dga-avatar/dga-avatar.tsx::AvatarType"
                        }
                    }
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "attribute": "type",
                "reflect": false,
                "defaultValue": "'icon'"
            },
            "size": {
                "type": "number",
                "mutable": false,
                "complexType": {
                    "original": "AvatarSize",
                    "resolved": "120 | 24 | 32 | 40 | 48 | 68 | 80",
                    "references": {
                        "AvatarSize": {
                            "location": "local",
                            "path": "/home/mamoud/Documents/temp/components/platform-code-cross-platform-storybook/packages/core/src/components/dga-avatar/dga-avatar.tsx",
                            "id": "src/components/dga-avatar/dga-avatar.tsx::AvatarSize"
                        }
                    }
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "attribute": "size",
                "reflect": false,
                "defaultValue": "32"
            },
            "square": {
                "type": "boolean",
                "mutable": true,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "attribute": "square",
                "reflect": true,
                "defaultValue": "false"
            },
            "border": {
                "type": "boolean",
                "mutable": true,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "attribute": "border",
                "reflect": true,
                "defaultValue": "false"
            },
            "text": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "attribute": "text",
                "reflect": false,
                "defaultValue": "'AB'"
            },
            "imgUrl": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "attribute": "img-url",
                "reflect": false,
                "defaultValue": "'/assets/avatar-img.png'"
            },
            "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,
                "defaultValue": "''"
            },
            "icon": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "Icon",
                    "resolved": "Icon",
                    "references": {
                        "Icon": {
                            "location": "local",
                            "path": "/home/mamoud/Documents/temp/components/platform-code-cross-platform-storybook/packages/core/src/components/dga-avatar/dga-avatar.tsx",
                            "id": "src/components/dga-avatar/dga-avatar.tsx::Icon"
                        }
                    }
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false
            }
        };
    }
}
//# sourceMappingURL=dga-avatar.js.map
