"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "DocxReader", {
    enumerable: true,
    get: function() {
        return DocxReader;
    }
});
const _mammoth = /*#__PURE__*/ _interop_require_default(require("mammoth"));
const _Node = require("../Node.js");
const _type = require("./type.js");
function _interop_require_default(obj) {
    return obj && obj.__esModule ? obj : {
        default: obj
    };
}
class DocxReader extends _type.FileReader {
    /** DocxParser */ async loadDataAsContent(fileContent) {
        const { value } = await _mammoth.default.extractRawText({
            buffer: fileContent
        });
        return [
            new _Node.Document({
                text: value
            })
        ];
    }
}
