import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var TextTracking24 = /** @class */ (function () {
    function TextTracking24(elementRef) {
        this.elementRef = elementRef;
    }
    TextTracking24.prototype.ngAfterViewInit = function () {
        var svg = this.elementRef.nativeElement.querySelector("svg");
        var attributes = getAttributes({
            width: 24,
            height: 24,
            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;
            TextTracking24.titleIdCounter++;
            title.setAttribute("id", "text-tracking24-" + TextTracking24.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "text-tracking24-" + TextTracking24.titleIdCounter);
        }
    };
    TextTracking24.titleIdCounter = 0;
    TextTracking24.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-text-tracking24",
                    template: "<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" style=\"will-change: transform;\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 32 32\" aria-hidden=\"true\"><path d=\"M25.29 19.29l-1.41 1.42L26.17 23H5.83l2.29-2.29-1.41-1.42L2 24l4.71 4.71 1.41-1.42L5.83 25h20.34l-2.29 2.29 1.41 1.42L30 24l-4.71-4.71zM26 17h2L23 3h-2l-5 14h2l1-3h6zm-6.33-5L22 5l2.33 7zM14 3l-4 12L6 3H4l5 14h2l5-14h-2z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    TextTracking24.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    TextTracking24.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return TextTracking24;
}());
export { TextTracking24 };
var TextTracking24Module = /** @class */ (function () {
    function TextTracking24Module() {
    }
    TextTracking24Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        TextTracking24
                    ],
                    exports: [
                        TextTracking24
                    ]
                },] },
    ];
    return TextTracking24Module;
}());
export { TextTracking24Module };
//# sourceMappingURL=24.js.map