import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var Bus24 = /** @class */ (function () {
    function Bus24(elementRef) {
        this.elementRef = elementRef;
    }
    Bus24.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;
            Bus24.titleIdCounter++;
            title.setAttribute("id", "bus24-" + Bus24.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "bus24-" + Bus24.titleIdCounter);
        }
    };
    Bus24.titleIdCounter = 0;
    Bus24.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-bus24",
                    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=\"M3 8h2v6H3zm24 0h2v6h-2zM10 19h2v2h-2zm10 0h2v2h-2z\"></path><path d=\"M21 2H11a5 5 0 0 0-5 5v16a2 2 0 0 0 2 2v3h2v-3h12v3h2v-3a2 2 0 0 0 2-2V7a5 5 0 0 0-5-5zm3 6v7H8V8zM11 4h10a3 3 0 0 1 2.82 2H8.18A3 3 0 0 1 11 4zM8 23v-6h16v6z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    Bus24.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    Bus24.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return Bus24;
}());
export { Bus24 };
var Bus24Module = /** @class */ (function () {
    function Bus24Module() {
    }
    Bus24Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        Bus24
                    ],
                    exports: [
                        Bus24
                    ]
                },] },
    ];
    return Bus24Module;
}());
export { Bus24Module };
//# sourceMappingURL=24.js.map