import { z } from "zod";

export const AmqSongCategory = z.enum({
	none: 0,
	instrumental: 1,
	chanting: 2,
	character: 3,
	standard: 4,
});

export const AmqSongSchema = z.object({
	annSongId: z.int().positive(),
	songId: z.int().positive(),
	name: z.string(),
	category: AmqSongCategory,
	songArtistId: z.int().positive().nullable(),
	songGroupId: z.int().positive().nullable(),
	composerArtistId: z.int().positive().nullable(),
	composerGroupId: z.int().positive().nullable(),
	arrangerArtistId: z.int().positive().nullable(),
	arrangerGroupId: z.int().positive().nullable(),
	globalPercent: z.number().int().min(0).max(100),
	fileName: z.string().nullable(),
	fileNameMap: z.object({
		"0": z.string().optional(),
		"480": z.string().optional(),
		"720": z.string().optional(),
	}),
	meanVolume: z.number().negative().nullable(),
});
