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