import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var Undo16 = /** @class */ (function () {
    function Undo16(elementRef) {
        this.elementRef = elementRef;
    }
    Undo16.prototype.ngAfterViewInit = function () {
        var svg = this.elementRef.nativeElement.querySelector("svg");
        var attributes = getAttributes({
            width: 16,
            height: 16,
            viewBox: "0 0 16 16",
            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;
            Undo16.titleIdCounter++;
            title.setAttribute("id", "undo16-" + Undo16.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "undo16-" + Undo16.titleIdCounter);
        }
    };
    Undo16.titleIdCounter = 0;
    Undo16.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-undo16",
                    template: "<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" style=\"will-change: transform;\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden=\"true\"><path d=\"M12 8c1.2 0 2 .8 2 2s-.8 2-2 2H9v1h3c1.7 0 3-1.2 3-3 0-1.7-1.3-3-3-3H2.9l2-2-.7-.7L1 7.5l3.2 3.2.7-.7-2-2H12z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    Undo16.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    Undo16.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return Undo16;
}());
export { Undo16 };
var Undo16Module = /** @class */ (function () {
    function Undo16Module() {
    }
    Undo16Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        Undo16
                    ],
                    exports: [
                        Undo16
                    ]
                },] },
    ];
    return Undo16Module;
}());
export { Undo16Module };
//# sourceMappingURL=16.js.map