import { z } from 'zod';
import { LIGHTS_EFFECT } from './Lights.const';

export const lightsEffectSchema = z.enum(LIGHTS_EFFECT);

export const showLightsColorParamsSchema = z.object({
  address: z.union([z.array(z.number()), z.literal('all')]),
  timeDuration: z.number().min(1).max(25),
  color: z.string(), // Hex RGB
});

export const showLightsEffectParamsSchema = z.object({
  addresses: z.union([z.array(z.number()), z.literal('all')]),
  effect: lightsEffectSchema,
  timeDuration: z.number().min(1).max(25),
});
