import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var RecentlyViewed20 = /** @class */ (function () {
    function RecentlyViewed20(elementRef) {
        this.elementRef = elementRef;
    }
    RecentlyViewed20.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;
            RecentlyViewed20.titleIdCounter++;
            title.setAttribute("id", "recently-viewed20-" + RecentlyViewed20.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "recently-viewed20-" + RecentlyViewed20.titleIdCounter);
        }
    };
    RecentlyViewed20.titleIdCounter = 0;
    RecentlyViewed20.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-recently-viewed20",
                    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=\"M20.59 22L15 16.41V7h2v8.58l5 5.01L20.59 22z\"></path><path d=\"M16 2A13.94 13.94 0 0 0 6 6.23V2H4v8h8V8H7.08A12 12 0 1 1 4 16H2A14 14 0 1 0 16 2z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    RecentlyViewed20.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    RecentlyViewed20.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return RecentlyViewed20;
}());
export { RecentlyViewed20 };
var RecentlyViewed20Module = /** @class */ (function () {
    function RecentlyViewed20Module() {
    }
    RecentlyViewed20Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        RecentlyViewed20
                    ],
                    exports: [
                        RecentlyViewed20
                    ]
                },] },
    ];
    return RecentlyViewed20Module;
}());
export { RecentlyViewed20Module };
//# sourceMappingURL=20.js.map