"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "ImageReader", {
    enumerable: true,
    get: function() {
        return ImageReader;
    }
});
const _Node = require("../Node.js");
const _type = require("./type.js");
class ImageReader extends _type.FileReader {
    /**
   * Public method for this reader.
   * Required by BaseReader interface.
   * @param file Path/name of the file to be loaded.
   * @param fs fs wrapper interface for getting the file content.
   * @returns Promise<Document[]> A Promise object, eventually yielding zero or one ImageDocument of the specified file.
   */ async loadDataAsContent(fileContent) {
        const blob = new Blob([
            fileContent
        ]);
        return [
            new _Node.ImageDocument({
                image: blob
            })
        ];
    }
}
