import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var QCircuitComposer20 = /** @class */ (function () {
    function QCircuitComposer20(elementRef) {
        this.elementRef = elementRef;
    }
    QCircuitComposer20.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;
            QCircuitComposer20.titleIdCounter++;
            title.setAttribute("id", "q-circuit-composer20-" + QCircuitComposer20.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "q-circuit-composer20-" + QCircuitComposer20.titleIdCounter);
        }
    };
    QCircuitComposer20.titleIdCounter = 0;
    QCircuitComposer20.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-q-circuit-composer20",
                    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=\"M18 9v6h-4V9h-2v14h2v-6h4v6h2V9h-2z\"></path><path d=\"M30 15h-4V6a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v9H2v2h4v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-9h4zM8 26V6h16v20z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    QCircuitComposer20.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    QCircuitComposer20.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return QCircuitComposer20;
}());
export { QCircuitComposer20 };
var QCircuitComposer20Module = /** @class */ (function () {
    function QCircuitComposer20Module() {
    }
    QCircuitComposer20Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        QCircuitComposer20
                    ],
                    exports: [
                        QCircuitComposer20
                    ]
                },] },
    ];
    return QCircuitComposer20Module;
}());
export { QCircuitComposer20Module };
//# sourceMappingURL=20.js.map