"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.sharedSourceConfigSchema = exports.MainFieldsSchema = exports.BuilderTargetSchema = void 0;
const utils_1 = require("../utils");
exports.BuilderTargetSchema = utils_1.z.literals([
    'web',
    'node',
    'modern-web',
    'web-worker',
]);
exports.MainFieldsSchema = utils_1.z.array(utils_1.z.arrayOrNot(utils_1.z.string()));
exports.sharedSourceConfigSchema = utils_1.z.partialObj({
    alias: utils_1.z.chained(utils_1.z.record(utils_1.z.arrayOrNot(utils_1.z.string()))),
    include: utils_1.z.array(utils_1.z.union([utils_1.z.string(), utils_1.z.instanceof(RegExp)])),
    exclude: utils_1.z.array(utils_1.z.union([utils_1.z.string(), utils_1.z.instanceof(RegExp)])),
    preEntry: utils_1.z.arrayOrNot(utils_1.z.string()),
    globalVars: utils_1.z.chained(utils_1.z.any(), utils_1.z.any()),
    compileJsDataURI: utils_1.z.boolean(),
    resolveMainFields: utils_1.z.union([
        exports.MainFieldsSchema,
        utils_1.z.record(exports.BuilderTargetSchema, exports.MainFieldsSchema),
    ]),
    resolveExtensionPrefix: utils_1.z.union([
        utils_1.z.string(),
        utils_1.z.record(exports.BuilderTargetSchema, utils_1.z.string()),
    ]),
});
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const _schema = exports.sharedSourceConfigSchema;
