import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var Aperture20 = /** @class */ (function () {
    function Aperture20(elementRef) {
        this.elementRef = elementRef;
    }
    Aperture20.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;
            Aperture20.titleIdCounter++;
            title.setAttribute("id", "aperture20-" + Aperture20.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "aperture20-" + Aperture20.titleIdCounter);
        }
    };
    Aperture20.titleIdCounter = 0;
    Aperture20.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-aperture20",
                    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 2a14 14 0 1 0 14 14A14 14 0 0 0 16 2zm11.84 12.14L22 17.52V5.62a12 12 0 0 1 5.84 8.52zM12 18.68v-5.36L16 11l4 2.31v5.36L16 21zm8-14V11l-9.66-5.58A11.9 11.9 0 0 1 20 4.7zm-11.52 2L14 9.85 4 15.62a12 12 0 0 1 4.48-8.96zM4.16 17.85L10 14.47v11.91a12 12 0 0 1-5.84-8.53zM12 27.3V21l9.67 5.58A11.92 11.92 0 0 1 16 28a12.05 12.05 0 0 1-4-.7zm11.52-2L18 22.14l10-5.77a12 12 0 0 1-4.48 8.97z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    Aperture20.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    Aperture20.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return Aperture20;
}());
export { Aperture20 };
var Aperture20Module = /** @class */ (function () {
    function Aperture20Module() {
    }
    Aperture20Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        Aperture20
                    ],
                    exports: [
                        Aperture20
                    ]
                },] },
    ];
    return Aperture20Module;
}());
export { Aperture20Module };
//# sourceMappingURL=20.js.map