import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var Van24 = /** @class */ (function () {
    function Van24(elementRef) {
        this.elementRef = elementRef;
    }
    Van24.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;
            Van24.titleIdCounter++;
            title.setAttribute("id", "van24-" + Van24.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "van24-" + Van24.titleIdCounter);
        }
    };
    Van24.titleIdCounter = 0;
    Van24.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-van24",
                    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=\"M29.81 16l-7-9.56A1 1 0 0 0 22 6H3a1 1 0 0 0-1 1v17a1 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.44a1 1 0 0 0-.19-.56zM20 8h1.49l5.13 7H20zM9 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 0H4V8h14v9h10z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    Van24.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    Van24.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return Van24;
}());
export { Van24 };
var Van24Module = /** @class */ (function () {
    function Van24Module() {
    }
    Van24Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        Van24
                    ],
                    exports: [
                        Van24
                    ]
                },] },
    ];
    return Van24Module;
}());
export { Van24Module };
//# sourceMappingURL=24.js.map