export type TimerSoundType =
  | 'gentle-chime'
  | 'soft-bell'
  | 'xylophone'
  | 'singing-bowl'
  | 'nature-birds'
  | 'ocean-wave'
  | 'rain-stick'
  | 'harp-gliss';

export type SensoryBackgroundId =
  | 'ocean'
  | 'aurora'
  | 'lava'
  | 'galaxy'
  | 'forest'
  | 'rain'
  | 'coral'
  | 'sunset';

export type SensoryBackgroundIconId =
  | 'waves'
  | 'sparkles'
  | 'sun'
  | 'moon'
  | 'tree-pine'
  | 'cloud-rain'
  | 'fish'
  | 'mountain';

export type SensoryBackground = {
  readonly id: SensoryBackgroundId;
  readonly name: string;
  readonly iconId: SensoryBackgroundIconId;
  readonly image: string;
  readonly overlay: string;
  readonly textColor: string;
  readonly accentColor: string;
  readonly ringColor: string;
  readonly trackColor: string;
};

export type TimerSoundOption = {
  readonly id: TimerSoundType;
  readonly name: string;
  readonly icon: string;
  readonly frequency: number;
};

/** Storage origin of a pickable timer sound. */
export type TimerSoundKind = 'builtin' | 'recipe' | 'file' | 'url';

/**
 * A unified sound the picker can select and play, regardless of origin: a
 * hardcoded built-in (`builtin`, synthesized by id), a generated `recipe`
 * (synthesized from parameters), or an `audio_files` `file`/`url` (played from a
 * URL). The `key` is unique across all origins.
 */
export type TimerSound = {
  readonly key: string;
  readonly name: string;
  readonly icon: string;
  readonly kind: TimerSoundKind;
  readonly soundType: TimerSoundType | null;
  readonly recipe: import('@/shared/types/audioFiles').SoundRecipe | null;
  readonly url: string | null;
  readonly audioFileId: string | null;
  readonly canDelete: boolean;
};

export type TimerSoundGroupId = 'builtin' | 'generated' | 'uploaded';

/** A labeled section of sounds for the picker (clear structure by type). */
export type TimerSoundGroup = {
  readonly id: TimerSoundGroupId;
  readonly label: string;
  readonly sounds: readonly TimerSound[];
};

export type PresetTimerOption = {
  readonly label: string;
  readonly seconds: number;
};

export type ClassroomTimerTip = {
  readonly title: string;
  readonly body: string;
};

export type TimerParticle = {
  readonly id: number;
  readonly width: number;
  readonly height: number;
  readonly left: number;
  readonly top: number;
  readonly animationDelay: number;
  readonly animationDuration: number;
};
