import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var LetterVv20 = /** @class */ (function () {
    function LetterVv20(elementRef) {
        this.elementRef = elementRef;
    }
    LetterVv20.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;
            LetterVv20.titleIdCounter++;
            title.setAttribute("id", "letter-vv20-" + LetterVv20.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "letter-vv20-" + LetterVv20.titleIdCounter);
        }
    };
    LetterVv20.titleIdCounter = 0;
    LetterVv20.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-letter-vv20",
                    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=\"M25 13h-1.75L21 22.03 18.79 13H17l2.5 10h3L25 13zM13 9l-2 13L9 9H7l2.52 14h2.96L15 9h-2z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    LetterVv20.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    LetterVv20.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return LetterVv20;
}());
export { LetterVv20 };
var LetterVv20Module = /** @class */ (function () {
    function LetterVv20Module() {
    }
    LetterVv20Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        LetterVv20
                    ],
                    exports: [
                        LetterVv20
                    ]
                },] },
    ];
    return LetterVv20Module;
}());
export { LetterVv20Module };
//# sourceMappingURL=20.js.map