import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var Calculator20 = /** @class */ (function () {
    function Calculator20(elementRef) {
        this.elementRef = elementRef;
    }
    Calculator20.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;
            Calculator20.titleIdCounter++;
            title.setAttribute("id", "calculator20-" + Calculator20.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "calculator20-" + Calculator20.titleIdCounter);
        }
    };
    Calculator20.titleIdCounter = 0;
    Calculator20.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-calculator20",
                    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=\"M26 4v24H6V4h20m0-2H6a2 2 0 0 0-2 2v24a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2z\"></path><path d=\"M9 23h2v2H9zm12 0h2v2h-2zM9 18h2v2H9zm12 0h2v2h-2zM9 13h2v2H9zm6 10h2v2h-2zm0-5h2v2h-2zm0-5h2v2h-2zm6 0h2v2h-2zM9 7h14v3H9z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    Calculator20.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    Calculator20.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return Calculator20;
}());
export { Calculator20 };
var Calculator20Module = /** @class */ (function () {
    function Calculator20Module() {
    }
    Calculator20Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        Calculator20
                    ],
                    exports: [
                        Calculator20
                    ]
                },] },
    ];
    return Calculator20Module;
}());
export { Calculator20Module };
//# sourceMappingURL=20.js.map