import { z } from 'zod';
import { colorNameSchema } from '../../color';
import { kartEffectSchema } from '../../hardware/kart-effect';
import { RGB_STATUS } from './RGB.const';

export const rgbStatusSchema = z.enum(RGB_STATUS);

export const rgbModuleStatusSchema = z.object({
  rgbStatus: rgbStatusSchema,
  kartColor: colorNameSchema,
});

export const rgbConfigurationOptionsSchema = z.object({
  kartColor: colorNameSchema,
  brightness: z.number().min(0).max(100),
  effectTime: z.number().min(1).max(25),
});

export const rgbShowEffectOptionsSchema = z.object({
  effect: kartEffectSchema,
});
