import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var AddAlt20 = /** @class */ (function () {
    function AddAlt20(elementRef) {
        this.elementRef = elementRef;
    }
    AddAlt20.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;
            AddAlt20.titleIdCounter++;
            title.setAttribute("id", "add-alt20-" + AddAlt20.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "add-alt20-" + AddAlt20.titleIdCounter);
        }
    };
    AddAlt20.titleIdCounter = 0;
    AddAlt20.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-add-alt20",
                    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=\"M16 4A12 12 0 1 1 4 16 12 12 0 0 1 16 4m0-2a14 14 0 1 0 14 14A14 14 0 0 0 16 2z\"></path><path d=\"M22 15h-5v-5h-2v5h-5v2h5v5h2v-5h5v-2z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    AddAlt20.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    AddAlt20.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return AddAlt20;
}());
export { AddAlt20 };
var AddAlt20Module = /** @class */ (function () {
    function AddAlt20Module() {
    }
    AddAlt20Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        AddAlt20
                    ],
                    exports: [
                        AddAlt20
                    ]
                },] },
    ];
    return AddAlt20Module;
}());
export { AddAlt20Module };
//# sourceMappingURL=20.js.map