import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var Van20 = /** @class */ (function () {
    function Van20(elementRef) {
        this.elementRef = elementRef;
    }
    Van20.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;
            Van20.titleIdCounter++;
            title.setAttribute("id", "van20-" + Van20.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "van20-" + Van20.titleIdCounter);
        }
    };
    Van20.titleIdCounter = 0;
    Van20.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-van20",
                    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.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 */
    Van20.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    Van20.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return Van20;
}());
export { Van20 };
var Van20Module = /** @class */ (function () {
    function Van20Module() {
    }
    Van20Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        Van20
                    ],
                    exports: [
                        Van20
                    ]
                },] },
    ];
    return Van20Module;
}());
export { Van20Module };
//# sourceMappingURL=20.js.map