import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var RulerAlt20 = /** @class */ (function () {
    function RulerAlt20(elementRef) {
        this.elementRef = elementRef;
    }
    RulerAlt20.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;
            RulerAlt20.titleIdCounter++;
            title.setAttribute("id", "ruler-alt20-" + RulerAlt20.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "ruler-alt20-" + RulerAlt20.titleIdCounter);
        }
    };
    RulerAlt20.titleIdCounter = 0;
    RulerAlt20.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-ruler-alt20",
                    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=\"M29.41 21.67L10.34 2.58a2 2 0 0 0-2.83 0L2.59 7.51a2 2 0 0 0 0 2.82l19.07 19.09a2 2 0 0 0 1.42.58 2 2 0 0 0 1.41-.58l4.92-4.93a2 2 0 0 0 0-2.82zM23.08 28L4 8.92 8.92 4l3.79 3.79L10.46 10l1.41 1.41 2.25-2.21 4.13 4.13L16 15.58 17.42 17l2.25-2.25 4.13 4.13-2.25 2.25L23 22.54l2.25-2.25L28 23.08z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    RulerAlt20.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    RulerAlt20.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return RulerAlt20;
}());
export { RulerAlt20 };
var RulerAlt20Module = /** @class */ (function () {
    function RulerAlt20Module() {
    }
    RulerAlt20Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        RulerAlt20
                    ],
                    exports: [
                        RulerAlt20
                    ]
                },] },
    ];
    return RulerAlt20Module;
}());
export { RulerAlt20Module };
//# sourceMappingURL=20.js.map