import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var LogoTumblr20 = /** @class */ (function () {
    function LogoTumblr20(elementRef) {
        this.elementRef = elementRef;
    }
    LogoTumblr20.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;
            LogoTumblr20.titleIdCounter++;
            title.setAttribute("id", "logo-tumblr20-" + LogoTumblr20.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "logo-tumblr20-" + LogoTumblr20.titleIdCounter);
        }
    };
    LogoTumblr20.titleIdCounter = 0;
    LogoTumblr20.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-logo-tumblr20",
                    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=\"M22.6 28h-4c-3.59 0-6.3-1.86-6.3-6.3v-7.12H9v-3.86A7.17 7.17 0 0 0 14.3 4h3.76v6.12h4.36v4.46h-4.36v6.2c0 1.86.94 2.49 2.42 2.49h2.12z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    LogoTumblr20.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    LogoTumblr20.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return LogoTumblr20;
}());
export { LogoTumblr20 };
var LogoTumblr20Module = /** @class */ (function () {
    function LogoTumblr20Module() {
    }
    LogoTumblr20Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        LogoTumblr20
                    ],
                    exports: [
                        LogoTumblr20
                    ]
                },] },
    ];
    return LogoTumblr20Module;
}());
export { LogoTumblr20Module };
//# sourceMappingURL=20.js.map