"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.YfmFilesUploadProcessBase = void 0;
const upload_1 = require("../../../behavior/utils/upload.js");
const YfmFileSpecs_1 = require("../YfmFileSpecs/index.js");
const utils_1 = require("../utils.js");
const skeleton_1 = require("./skeleton.js");
class YfmFilesUploadProcessBase extends upload_1.FilesBatchUploadProcess {
    createFile;
    constructor(view, files, uploadHandler) {
        super(view, files, uploadHandler);
        this.createFile = (0, utils_1.createFileNode)((0, YfmFileSpecs_1.fileType)(this.view.state.schema));
    }
    createSkeleton() {
        return new skeleton_1.FileSkeletonDescriptor(this.getSkeletonInitPos());
    }
    async createPMNode(res) {
        return this.createFile(res);
    }
}
exports.YfmFilesUploadProcessBase = YfmFilesUploadProcessBase;
//# sourceMappingURL=upload.js.map
