import { h } from "@stencil/core";
export class DgaIconV2 {
    constructor() {
        this.variant = 'bulk';
        this.type = 'rounded';
    }
    // Initialize class name on component load
    componentDidLoad() {
        this.updateIcon();
    }
    // Update class name when properties change
    updateIcon() {
        if (this.container) {
            // Convert the name to lowercase, replace "Icon" suffix, and separate words with hyphens
            const className = this.name
                .replace(/([a-z])([A-Z])/g, '$1-$2')
                .replace(/([A-Z])([0-9])/g, '$1-$2')
                .replace(/([a-z])([0-9])/g, '$1-$2')
                .toLowerCase()
                .replace('-icon', '')
                .replace('icon', '')
                .trim();
            // Build the final class string
            const iconClass = `hgi-${this.variant || ''} ${this.type ? `hgi-${this.type}` : ''} hgi-${className}`;
            // Apply the class to the icon element
            this.container.className = iconClass;
        }
    }
    render() {
        return (h("div", { key: '0199f561c02fad1bf0fba214d173b9f3e95d6445', style: {
                width: '100%',
                height: '100%',
                display: 'flex',
                alignItems: 'center',
                justifyContent: 'center',
                fontSize: 'inherit',
            } }, h("i", { key: '10b084c0b5a653e81af0df4cff15e69bffd18785', style: {
                fontSize: `${this.size ? `${this.size}px` : 'inherit'}`,
                color: this.color,
            }, ref: el => (this.container = el) })));
    }
    static get is() { return "dga-icon-v2"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["dga-icon.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["dga-icon.css"]
        };
    }
    static get properties() {
        return {
            "name": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "attribute": "name",
                "reflect": false
            },
            "size": {
                "type": "number",
                "mutable": false,
                "complexType": {
                    "original": "number",
                    "resolved": "number",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "attribute": "size",
                "reflect": false
            },
            "color": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "attribute": "color",
                "reflect": false
            },
            "variant": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "'stroke' | 'solid' | 'duotone' | 'twotone' | 'bulk'",
                    "resolved": "\"bulk\" | \"duotone\" | \"solid\" | \"stroke\" | \"twotone\"",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "attribute": "variant",
                "reflect": false,
                "defaultValue": "'bulk'"
            },
            "type": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "'rounded' | 'sharp' | 'standard'",
                    "resolved": "\"rounded\" | \"sharp\" | \"standard\"",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "attribute": "type",
                "reflect": false,
                "defaultValue": "'rounded'"
            }
        };
    }
    static get watchers() {
        return [{
                "propName": "icon",
                "methodName": "updateIcon"
            }, {
                "propName": "variant",
                "methodName": "updateIcon"
            }, {
                "propName": "type",
                "methodName": "updateIcon"
            }];
    }
}
//# sourceMappingURL=dga-icon-v2.js.map
