import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var QCY20 = /** @class */ (function () {
    function QCY20(elementRef) {
        this.elementRef = elementRef;
    }
    QCY20.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;
            QCY20.titleIdCounter++;
            title.setAttribute("id", "qcy20-" + QCY20.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "qcy20-" + QCY20.titleIdCounter);
        }
    };
    QCY20.titleIdCounter = 0;
    QCY20.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-qcy20",
                    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=\"M15 23h-5a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2h5v2h-5v6h5zm9-14h-2l-2 7-2-7h-2l3 9v5h2v-5l3-9z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    QCY20.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    QCY20.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return QCY20;
}());
export { QCY20 };
var QCY20Module = /** @class */ (function () {
    function QCY20Module() {
    }
    QCY20Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        QCY20
                    ],
                    exports: [
                        QCY20
                    ]
                },] },
    ];
    return QCY20Module;
}());
export { QCY20Module };
//# sourceMappingURL=20.js.map