import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var Xls20 = /** @class */ (function () {
    function Xls20(elementRef) {
        this.elementRef = elementRef;
    }
    Xls20.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;
            Xls20.titleIdCounter++;
            title.setAttribute("id", "xls20-" + Xls20.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "xls20-" + Xls20.titleIdCounter);
        }
    };
    Xls20.titleIdCounter = 0;
    Xls20.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-xls20",
                    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=\"M28 23h-6v-2h6v-4h-4a2.002 2.002 0 0 1-2-2v-4a2.002 2.002 0 0 1 2-2h6v2h-6v4h4a2.002 2.002 0 0 1 2 2v4a2.002 2.002 0 0 1-2 2zm-14-2V9h-2v14h8v-2h-6zM10 9H8l-2 6-2-6H2l2.752 7L2 23h2l2-6 2 6h2l-2.755-7L10 9z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    Xls20.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    Xls20.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return Xls20;
}());
export { Xls20 };
var Xls20Module = /** @class */ (function () {
    function Xls20Module() {
    }
    Xls20Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        Xls20
                    ],
                    exports: [
                        Xls20
                    ]
                },] },
    ];
    return Xls20Module;
}());
export { Xls20Module };
//# sourceMappingURL=20.js.map