import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var DocumentExport20 = /** @class */ (function () {
    function DocumentExport20(elementRef) {
        this.elementRef = elementRef;
    }
    DocumentExport20.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;
            DocumentExport20.titleIdCounter++;
            title.setAttribute("id", "document-export20-" + DocumentExport20.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "document-export20-" + DocumentExport20.titleIdCounter);
        }
    };
    DocumentExport20.titleIdCounter = 0;
    DocumentExport20.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-document-export20",
                    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=\"M13 21h13.17l-2.58 2.59L25 25l5-5-5-5-1.41 1.41L26.17 19H13v2z\"></path><path d=\"M22 14v-4a1 1 0 0 0-.29-.71l-7-7A1 1 0 0 0 14 2H4a2 2 0 0 0-2 2v24a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2h-2v2H4V4h8v6a2 2 0 0 0 2 2h6v2zm-8-4V4.41L19.59 10z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    DocumentExport20.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    DocumentExport20.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return DocumentExport20;
}());
export { DocumentExport20 };
var DocumentExport20Module = /** @class */ (function () {
    function DocumentExport20Module() {
    }
    DocumentExport20Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        DocumentExport20
                    ],
                    exports: [
                        DocumentExport20
                    ]
                },] },
    ];
    return DocumentExport20Module;
}());
export { DocumentExport20Module };
//# sourceMappingURL=20.js.map