import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var TextCreation20 = /** @class */ (function () {
    function TextCreation20(elementRef) {
        this.elementRef = elementRef;
    }
    TextCreation20.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;
            TextCreation20.titleIdCounter++;
            title.setAttribute("id", "text-creation20-" + TextCreation20.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "text-creation20-" + TextCreation20.titleIdCounter);
        }
    };
    TextCreation20.titleIdCounter = 0;
    TextCreation20.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-text-creation20",
                    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=\"M27 22.14V9.86A4 4 0 1 0 22.14 5H9.86A4 4 0 1 0 5 9.86v12.28A4 4 0 1 0 9.86 27h12.28A4 4 0 1 0 27 22.14zM26 4a2 2 0 1 1-2 2 2 2 0 0 1 2-2zM4 6a2 2 0 1 1 2 2 2 2 0 0 1-2-2zm2 22a2 2 0 1 1 2-2 2 2 0 0 1-2 2zm16.14-3H9.86A4 4 0 0 0 7 22.14V9.86A4 4 0 0 0 9.86 7h12.28A4 4 0 0 0 25 9.86v12.28A4 4 0 0 0 22.14 25zM26 28a2 2 0 1 1 2-2 2 2 0 0 1-2 2z\"></path><path d=\"M21 11H11v2h4v9h2v-9h4v-2z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    TextCreation20.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    TextCreation20.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return TextCreation20;
}());
export { TextCreation20 };
var TextCreation20Module = /** @class */ (function () {
    function TextCreation20Module() {
    }
    TextCreation20Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        TextCreation20
                    ],
                    exports: [
                        TextCreation20
                    ]
                },] },
    ];
    return TextCreation20Module;
}());
export { TextCreation20Module };
//# sourceMappingURL=20.js.map