import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var DocumentImport20 = /** @class */ (function () {
    function DocumentImport20(elementRef) {
        this.elementRef = elementRef;
    }
    DocumentImport20.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;
            DocumentImport20.titleIdCounter++;
            title.setAttribute("id", "document-import20-" + DocumentImport20.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "document-import20-" + DocumentImport20.titleIdCounter);
        }
    };
    DocumentImport20.titleIdCounter = 0;
    DocumentImport20.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-document-import20",
                    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 19H14.83l2.58-2.59L16 15l-5 5 5 5 1.41-1.41L14.83 21H28v-2z\"></path><path d=\"M24 14v-4a1 1 0 0 0-.29-.71l-7-7A1 1 0 0 0 16 2H6a2 2 0 0 0-2 2v24a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2h-2v2H6V4h8v6a2 2 0 0 0 2 2h6v2zm-8-4V4.41L21.59 10z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    DocumentImport20.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    DocumentImport20.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return DocumentImport20;
}());
export { DocumentImport20 };
var DocumentImport20Module = /** @class */ (function () {
    function DocumentImport20Module() {
    }
    DocumentImport20Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        DocumentImport20
                    ],
                    exports: [
                        DocumentImport20
                    ]
                },] },
    ];
    return DocumentImport20Module;
}());
export { DocumentImport20Module };
//# sourceMappingURL=20.js.map