import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var Undo20 = /** @class */ (function () {
    function Undo20(elementRef) {
        this.elementRef = elementRef;
    }
    Undo20.prototype.ngAfterViewInit = function () {
        var svg = this.elementRef.nativeElement.querySelector("svg");
        var attributes = getAttributes({
            width: 20,
            height: 20,
            viewBox: "0 0 20 20",
            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;
            Undo20.titleIdCounter++;
            title.setAttribute("id", "undo20-" + Undo20.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "undo20-" + Undo20.titleIdCounter);
        }
    };
    Undo20.titleIdCounter = 0;
    Undo20.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-undo20",
                    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 20 20\" aria-hidden=\"true\"><path d=\"M15 9.3c1.5 0 2.8 1.3 2.8 2.7 0 1.5-1.3 2.7-2.8 2.7h-4V16h4c2.3 0 4-1.7 4-4 0-2.2-1.8-4-4-4H3.4l2.5-2.5-.9-.9-4 4 4 4 .9-.9-2.5-2.4H15z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    Undo20.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    Undo20.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return Undo20;
}());
export { Undo20 };
var Undo20Module = /** @class */ (function () {
    function Undo20Module() {
    }
    Undo20Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        Undo20
                    ],
                    exports: [
                        Undo20
                    ]
                },] },
    ];
    return Undo20Module;
}());
export { Undo20Module };
//# sourceMappingURL=20.js.map