import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var Scan32 = /** @class */ (function () {
    function Scan32(elementRef) {
        this.elementRef = elementRef;
    }
    Scan32.prototype.ngAfterViewInit = function () {
        var svg = this.elementRef.nativeElement.querySelector("svg");
        var attributes = getAttributes({
            width: 32,
            height: 32,
            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;
            Scan32.titleIdCounter++;
            title.setAttribute("id", "scan32-" + Scan32.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "scan32-" + Scan32.titleIdCounter);
        }
    };
    Scan32.titleIdCounter = 0;
    Scan32.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-scan32",
                    template: "<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" style=\"will-change: transform;\" xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" viewBox=\"0 0 32 32\" aria-hidden=\"true\"><path d=\"M21 29H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16v2H5v22h16z\"></path><path d=\"M15 9h2v14h-2zm12 0h2v14h-2zm-6 0h2v14h-2z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    Scan32.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    Scan32.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return Scan32;
}());
export { Scan32 };
var Scan32Module = /** @class */ (function () {
    function Scan32Module() {
    }
    Scan32Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        Scan32
                    ],
                    exports: [
                        Scan32
                    ]
                },] },
    ];
    return Scan32Module;
}());
export { Scan32Module };
//# sourceMappingURL=32.js.map