"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ManifestSchema = void 0;
const zod_1 = require("zod");
//Zod schemas:
const VersionSchema = zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.number())]);
const HeaderSchema = zod_1.z.object({
    name: zod_1.z.string(),
    uuid: zod_1.z.string(),
    version: VersionSchema,
    description: zod_1.z.string().optional(),
    base_game_version: VersionSchema.optional(),
    lock_template_options: zod_1.z.boolean().optional(),
    allow_random_seed: zod_1.z.boolean().optional(),
    min_engine_version: VersionSchema.optional(),
    max_engine_version: VersionSchema.optional(),
    platform_locked: zod_1.z.boolean().optional(),
    packScope: zod_1.z.string().optional(),
});
const ModuleSchema = zod_1.z.array(zod_1.z.object({
    type: zod_1.z.string(),
    uuid: zod_1.z.string(),
    version: VersionSchema,
    description: zod_1.z.string().optional(),
    language: zod_1.z.string().optional(),
    entry: zod_1.z.string().optional(),
}));
const SubpackSchema = zod_1.z.array(zod_1.z.object({
    folder_name: zod_1.z.string(),
    name: zod_1.z.string(),
    memory_tier: zod_1.z.number(),
}));
const DependenciesSchema = zod_1.z.array(zod_1.z.object({
    uuid: zod_1.z.string().optional(),
    module_name: zod_1.z.string().optional(),
    version: VersionSchema,
}));
const MetadataSchema = zod_1.z.object({
    authors: zod_1.z.array(zod_1.z.string()).optional(),
    product_type: zod_1.z.string().optional(),
});
const SettingsSchema = zod_1.z.array(zod_1.z.object({
    type: zod_1.z.string(),
    text: zod_1.z.string(),
    name: zod_1.z.string().optional(),
    default: zod_1.z.union([zod_1.z.boolean(), zod_1.z.number(), zod_1.z.string()]).optional(),
    min: zod_1.z.number().optional(),
    max: zod_1.z.number().optional(),
    step: zod_1.z.number().optional(),
    options: zod_1.z
        .array(zod_1.z.object({
        name: zod_1.z.string().optional(),
        text: zod_1.z.string().optional(),
    }))
        .optional(),
}));
exports.ManifestSchema = zod_1.z.object({
    format_version: zod_1.z.number(),
    header: HeaderSchema,
    modules: ModuleSchema,
    dependencies: DependenciesSchema.optional(),
    subpacks: SubpackSchema.optional(),
    capabilities: zod_1.z.array(zod_1.z.string()).optional(),
    metadata: MetadataSchema.optional(),
    settings: SettingsSchema.optional(),
});

//# sourceMappingURL=../../maps/minecraft/manifests/JsonManifest.js.map
