import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var LogoDigg20 = /** @class */ (function () {
    function LogoDigg20(elementRef) {
        this.elementRef = elementRef;
    }
    LogoDigg20.prototype.ngAfterViewInit = function () {
        var svg = this.elementRef.nativeElement.querySelector("svg");
        var attributes = getAttributes({
            width: 20,
            height: 20,
            viewBox: "0 0 32 32",
            title: this.title,
            "aria-label": this.ariaLabel,
            "aria-labelledby": this.ariaLabelledby,
            "aria-hidden": this.ariaHidden,
            focusable: this.focusable
        });
        var attrKeys = Object.keys(attributes);
        for (var i = 0; i < attrKeys.length; i++) {
            var key = attrKeys[i];
            var value = attributes[key];
            if (key === "title") {
                continue;
            }
            if (value) {
                svg.setAttribute(key, value);
            }
        }
        if (attributes.title) {
            var title = document.createElement("title");
            title.textContent = attributes.title;
            LogoDigg20.titleIdCounter++;
            title.setAttribute("id", "logo-digg20-" + LogoDigg20.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "logo-digg20-" + LogoDigg20.titleIdCounter);
        }
    };
    LogoDigg20.titleIdCounter = 0;
    LogoDigg20.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-logo-digg20",
                    template: "<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" style=\"will-change: transform;\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 32 32\" aria-hidden=\"true\"><path d=\"M6.48 7.6v3.92H2V21h7.28V7.6zm0 11.2H4.8v-5h1.68zm3.92-7.28h2.8v9.52h-2.8zm0-3.92h2.8v2.8h-2.8zm3.92 3.92V21h4.48v1.12h-4.48v2.28h7.28V11.52zm4.48 7.28h-1.68v-5h1.68zm3.92-7.28V21h4.48v1.12h-4.48v2.28H30V11.52zm4.48 7.28h-1.68v-5h1.68z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    LogoDigg20.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    LogoDigg20.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return LogoDigg20;
}());
export { LogoDigg20 };
var LogoDigg20Module = /** @class */ (function () {
    function LogoDigg20Module() {
    }
    LogoDigg20Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        LogoDigg20
                    ],
                    exports: [
                        LogoDigg20
                    ]
                },] },
    ];
    return LogoDigg20Module;
}());
export { LogoDigg20Module };
//# sourceMappingURL=20.js.map