import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var ChartPie32 = /** @class */ (function () {
    function ChartPie32(elementRef) {
        this.elementRef = elementRef;
    }
    ChartPie32.prototype.ngAfterViewInit = function () {
        var svg = this.elementRef.nativeElement.querySelector("svg");
        var attributes = getAttributes({
            width: 32,
            height: 32,
            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;
            ChartPie32.titleIdCounter++;
            title.setAttribute("id", "chart-pie32-" + ChartPie32.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "chart-pie32-" + ChartPie32.titleIdCounter);
        }
    };
    ChartPie32.titleIdCounter = 0;
    ChartPie32.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-chart-pie32",
                    template: "<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" style=\"will-change: transform;\" xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" viewBox=\"0 0 32 32\" aria-hidden=\"true\"><path d=\"M16 4a12 12 0 1 0 12 12A12 12 0 0 0 16 4zm10 11h-9V6.05A10 10 0 0 1 26 15zM15.42 26A10 10 0 0 1 15 6.05v9a2 2 0 0 0 2 2h9A10 10 0 0 1 15.42 26z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    ChartPie32.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    ChartPie32.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return ChartPie32;
}());
export { ChartPie32 };
var ChartPie32Module = /** @class */ (function () {
    function ChartPie32Module() {
    }
    ChartPie32Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        ChartPie32
                    ],
                    exports: [
                        ChartPie32
                    ]
                },] },
    ];
    return ChartPie32Module;
}());
export { ChartPie32Module };
//# sourceMappingURL=32.js.map