import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var LetterBb20 = /** @class */ (function () {
    function LetterBb20(elementRef) {
        this.elementRef = elementRef;
    }
    LetterBb20.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;
            LetterBb20.titleIdCounter++;
            title.setAttribute("id", "letter-bb20-" + LetterBb20.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "letter-bb20-" + LetterBb20.titleIdCounter);
        }
    };
    LetterBb20.titleIdCounter = 0;
    LetterBb20.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-letter-bb20",
                    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=\"M23 13h-4V9h-2v14h6a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2zm-4 8v-6h4v6zm-4-9a3 3 0 0 0-3-3H7v14h5a3 3 0 0 0 3-3v-2a3 3 0 0 0-.78-2 3 3 0 0 0 .78-2zm-6-1h3a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H9zm4 9a1 1 0 0 1-1 1H9v-4h3a1 1 0 0 1 1 1z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    LetterBb20.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    LetterBb20.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return LetterBb20;
}());
export { LetterBb20 };
var LetterBb20Module = /** @class */ (function () {
    function LetterBb20Module() {
    }
    LetterBb20Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        LetterBb20
                    ],
                    exports: [
                        LetterBb20
                    ]
                },] },
    ];
    return LetterBb20Module;
}());
export { LetterBb20Module };
//# sourceMappingURL=20.js.map