import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var Cloud20 = /** @class */ (function () {
    function Cloud20(elementRef) {
        this.elementRef = elementRef;
    }
    Cloud20.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;
            Cloud20.titleIdCounter++;
            title.setAttribute("id", "cloud20-" + Cloud20.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "cloud20-" + Cloud20.titleIdCounter);
        }
    };
    Cloud20.titleIdCounter = 0;
    Cloud20.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-cloud20",
                    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 7a7.66 7.66 0 0 1 1.51.15 8 8 0 0 1 6.35 6.34l.26 1.35 1.35.24a5.5 5.5 0 0 1-1 10.92H7.5a5.5 5.5 0 0 1-1-10.92l1.34-.24.26-1.35A8 8 0 0 1 16 7m0-2a10 10 0 0 0-9.83 8.12A7.5 7.5 0 0 0 7.49 28h17a7.5 7.5 0 0 0 1.32-14.88 10 10 0 0 0-7.94-7.94A10.27 10.27 0 0 0 16 5z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    Cloud20.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    Cloud20.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return Cloud20;
}());
export { Cloud20 };
var Cloud20Module = /** @class */ (function () {
    function Cloud20Module() {
    }
    Cloud20Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        Cloud20
                    ],
                    exports: [
                        Cloud20
                    ]
                },] },
    ];
    return Cloud20Module;
}());
export { Cloud20Module };
//# sourceMappingURL=20.js.map