import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var Xml20 = /** @class */ (function () {
    function Xml20(elementRef) {
        this.elementRef = elementRef;
    }
    Xml20.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;
            Xml20.titleIdCounter++;
            title.setAttribute("id", "xml20-" + Xml20.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "xml20-" + Xml20.titleIdCounter);
        }
    };
    Xml20.titleIdCounter = 0;
    Xml20.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-xml20",
                    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=\"M24 21V9h-2v14h8v-2h-6zM18 9l-1.52 5-.48 1.98-.46-1.98L14 9h-2v14h2v-8l-.16-2 .58 2L16 19.63 17.58 15l.58-2-.16 2v8h2V9h-2zm-8 0H8l-2 6-2-6H2l2.75 7L2 23h2l2-6 2 6h2l-2.75-7L10 9z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    Xml20.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    Xml20.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return Xml20;
}());
export { Xml20 };
var Xml20Module = /** @class */ (function () {
    function Xml20Module() {
    }
    Xml20Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        Xml20
                    ],
                    exports: [
                        Xml20
                    ]
                },] },
    ];
    return Xml20Module;
}());
export { Xml20Module };
//# sourceMappingURL=20.js.map