import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var Cognitive20 = /** @class */ (function () {
    function Cognitive20(elementRef) {
        this.elementRef = elementRef;
    }
    Cognitive20.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;
            Cognitive20.titleIdCounter++;
            title.setAttribute("id", "cognitive20-" + Cognitive20.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "cognitive20-" + Cognitive20.titleIdCounter);
        }
    };
    Cognitive20.titleIdCounter = 0;
    Cognitive20.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-cognitive20",
                    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=\"M30 13A11 11 0 0 0 19 2h-8a9 9 0 0 0-9 9v3a5 5 0 0 0 5 5h1.1a5 5 0 0 0 4.9 4h1.38l4 7 1.73-1-4-6.89A2 2 0 0 0 14.38 21H13a3 3 0 0 1 0-6h1v-2h-1a5 5 0 0 0-4.9 4H7a3 3 0 0 1-3-3v-2h2a3 3 0 0 0 3-3V8H7v1a1 1 0 0 1-1 1H4.08A7 7 0 0 1 11 4h6v2a1 1 0 0 1-1 1h-2v2h2a3 3 0 0 0 3-3V4a9 9 0 0 1 8.05 5H26a3 3 0 0 0-3 3v1h2v-1a1 1 0 0 1 1-1h1.77a8.76 8.76 0 0 1 .23 2v1a5 5 0 0 1-5 5h-3v2h3a7 7 0 0 0 3-.68V21a3 3 0 0 1-3 3h-1v2h1a5 5 0 0 0 5-5v-2.11A7 7 0 0 0 30 14z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    Cognitive20.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    Cognitive20.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return Cognitive20;
}());
export { Cognitive20 };
var Cognitive20Module = /** @class */ (function () {
    function Cognitive20Module() {
    }
    Cognitive20Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        Cognitive20
                    ],
                    exports: [
                        Cognitive20
                    ]
                },] },
    ];
    return Cognitive20Module;
}());
export { Cognitive20Module };
//# sourceMappingURL=20.js.map