"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const doc_1 = __importDefault(require("./doc"));
function preview(type) {
    return __awaiter(this, void 0, void 0, function* () {
        const previewHandler = {
            doc: doc_1.default, // 处理文档生成
        };
        if (Object.prototype.hasOwnProperty.call(previewHandler, type)) {
            yield previewHandler[type]();
        }
    });
}
function execPreview(options) {
    Object.keys(options).forEach((type) => __awaiter(this, void 0, void 0, function* () {
        yield preview(type);
    }));
}
exports.default = execPreview;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9jb21tYW5kcy9wcmV2aWV3L2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7O0FBQUEsZ0RBQThCO0FBTTlCLFNBQWUsT0FBTyxDQUFDLElBQTBCOztRQUMvQyxNQUFNLGNBQWMsR0FBa0I7WUFDcEMsR0FBRyxFQUFFLGFBQVUsRUFBRSxTQUFTO1NBQzNCLENBQUE7UUFDRCxJQUFJLE1BQU0sQ0FBQyxTQUFTLENBQUMsY0FBYyxDQUFDLElBQUksQ0FBQyxjQUFjLEVBQUUsSUFBSSxDQUFDLEVBQUU7WUFDOUQsTUFBTSxjQUFjLENBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQTtTQUM3QjtJQUNILENBQUM7Q0FBQTtBQUVELFNBQVMsV0FBVyxDQUFDLE9BQWU7SUFDbEMsTUFBTSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsQ0FBQyxPQUFPLENBQUMsQ0FBTyxJQUFJLEVBQUUsRUFBRTtRQUMxQyxNQUFNLE9BQU8sQ0FBQyxJQUE0QixDQUFDLENBQUE7SUFDN0MsQ0FBQyxDQUFBLENBQUMsQ0FBQTtBQUNKLENBQUM7QUFFRCxrQkFBZSxXQUFXLENBQUEifQ==