import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var TextSelection20 = /** @class */ (function () {
    function TextSelection20(elementRef) {
        this.elementRef = elementRef;
    }
    TextSelection20.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;
            TextSelection20.titleIdCounter++;
            title.setAttribute("id", "text-selection20-" + TextSelection20.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "text-selection20-" + TextSelection20.titleIdCounter);
        }
    };
    TextSelection20.titleIdCounter = 0;
    TextSelection20.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-text-selection20",
                    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=\"M28 27h-7a3 3 0 0 1-3-3v-2a3 3 0 0 1 3-3h5v-2a1 1 0 0 0-1-1h-6v-2h6a3 3 0 0 1 3 3zm-7-6a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h5v-4zM13 7h3V5h-3a4 4 0 0 0-3 1.38A4 4 0 0 0 7 5H4v2h3a2 2 0 0 1 2 2v5H5v2h4v7a2 2 0 0 1-2 2H4v2h3a4 4 0 0 0 3-1.38A4 4 0 0 0 13 27h3v-2h-3a2 2 0 0 1-2-2v-7h4v-2h-4V9a2 2 0 0 1 2-2z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    TextSelection20.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    TextSelection20.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return TextSelection20;
}());
export { TextSelection20 };
var TextSelection20Module = /** @class */ (function () {
    function TextSelection20Module() {
    }
    TextSelection20Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        TextSelection20
                    ],
                    exports: [
                        TextSelection20
                    ]
                },] },
    ];
    return TextSelection20Module;
}());
export { TextSelection20Module };
//# sourceMappingURL=20.js.map