"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createActionByType = exports.getScreenshoter = void 0;
const content_types_1 = require("@ewizardjs/content-types");
const lazyRequire_1 = require("../../bin/utils/lazyRequire");
const Config_1 = require("../../modules/Config");
const WizError_1 = require("../../modules/WizError");
const getContentType_1 = require("../getContentType");
exports.getScreenshoter = (0, getContentType_1.default)(createActionByType);
function createActionByType(type) {
    switch (type) {
        case content_types_1.ContentTypes.EDETAILER:
        case content_types_1.ContentTypes.SITE:
            return (0, lazyRequire_1.default)(Config_1.Config.getSync().screenshoter, { unsafe: true });
        default:
            throw new WizError_1.WizError('THUMBNAILS_CREATION_IMPOSSIBLE', type);
    }
}
exports.createActionByType = createActionByType;
//# sourceMappingURL=index.js.map