import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var Car20 = /** @class */ (function () {
    function Car20(elementRef) {
        this.elementRef = elementRef;
    }
    Car20.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;
            Car20.titleIdCounter++;
            title.setAttribute("id", "car20-" + Car20.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "car20-" + Car20.titleIdCounter);
        }
    };
    Car20.titleIdCounter = 0;
    Car20.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-car20",
                    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=\"M29.34 15.94l-7.73-2.78-3.24-4.06A3 3 0 0 0 16.05 8h-8a3 3 0 0 0-2.47 1.32l-2.71 4A5 5 0 0 0 2 16.11V24a1 1 0 0 0 1 1h2.14a4 4 0 0 0 7.72 0h6.28a4 4 0 0 0 7.72 0H29a1 1 0 0 0 1-1v-7.12a1 1 0 0 0-.66-.94zM9 26a2 2 0 1 1 2-2 2 2 0 0 1-2 2zm14 0a2 2 0 1 1 2-2 2 2 0 0 1-2 2zm5-3h-1.14a4 4 0 0 0-7.72 0h-6.28a4 4 0 0 0-7.72 0H4v-6.89a3 3 0 0 1 .52-1.69l2.71-4a1 1 0 0 1 .83-.42h8a1 1 0 0 1 .77.36l3.4 4.27a1.09 1.09 0 0 0 .44.32L28 17.58z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    Car20.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    Car20.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return Car20;
}());
export { Car20 };
var Car20Module = /** @class */ (function () {
    function Car20Module() {
    }
    Car20Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        Car20
                    ],
                    exports: [
                        Car20
                    ]
                },] },
    ];
    return Car20Module;
}());
export { Car20Module };
//# sourceMappingURL=20.js.map