import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var Misuse20 = /** @class */ (function () {
    function Misuse20(elementRef) {
        this.elementRef = elementRef;
    }
    Misuse20.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;
            Misuse20.titleIdCounter++;
            title.setAttribute("id", "misuse20-" + Misuse20.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "misuse20-" + Misuse20.titleIdCounter);
        }
    };
    Misuse20.titleIdCounter = 0;
    Misuse20.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-misuse20",
                    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=\"M10 1c-4.9 0-9 4.1-9 9s4.1 9 9 9 9-4 9-9-4-9-9-9zm3.5 13.5L10 11l-3.5 3.5-1-1L9 10 5.5 6.5l1-1L10 9l3.5-3.5 1 1L11 10l3.5 3.5-1 1z\"></path><path d=\"M13.5 14.5L10 11l-3.5 3.5-1-1L9 10 5.5 6.5l1-1L10 9l3.5-3.5 1 1L11 10l3.5 3.5-1 1z\" data-icon-path=\"inner-path\" opacity=\"0\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    Misuse20.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    Misuse20.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return Misuse20;
}());
export { Misuse20 };
var Misuse20Module = /** @class */ (function () {
    function Misuse20Module() {
    }
    Misuse20Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        Misuse20
                    ],
                    exports: [
                        Misuse20
                    ]
                },] },
    ];
    return Misuse20Module;
}());
export { Misuse20Module };
//# sourceMappingURL=20.js.map