export type SwitchType =
  | 'cream'
  | 'holypanda'
  | 'alpaca'
  | 'turquoise'
  | 'inkblack'
  | 'inkred'
  | 'mxblack'
  | 'mxbrown'
  | 'mxblue'
  | 'boxnavy'
  | 'buckling'
  | 'alpsblue'
  | 'topre';

/** @deprecated v1 project switch ids — migrated on load */
export type LegacySwitchType = 'cherry-mx-blue' | 'cherry-mx-red' | 'cherry-mx-brown';

export interface Marker {
  id: string;
  time: number;
  key: string;
  code?: string;
  releaseTime?: number;
}

export interface Project {
  version: number;
  switch: SwitchType;
  markers: Marker[];
}

export const SWITCH_OPTIONS: { id: SwitchType; label: string }[] = [
  { id: 'cream', label: 'NovelKeys Creams' },
  { id: 'holypanda', label: 'Holy Pandas' },
  { id: 'alpaca', label: 'Alpacas' },
  { id: 'turquoise', label: 'Turquoise Tealios' },
  { id: 'inkblack', label: 'Gateron Black Inks' },
  { id: 'inkred', label: 'Gateron Red Inks' },
  { id: 'mxblack', label: 'Cherry MX Blacks' },
  { id: 'mxbrown', label: 'Cherry MX Browns' },
  { id: 'mxblue', label: 'Cherry MX Blues' },
  { id: 'boxnavy', label: 'Kailh Box Navies' },
  { id: 'buckling', label: 'Buckling Spring' },
  { id: 'alpsblue', label: 'SKCM Blue Alps' },
  { id: 'topre', label: 'Topre' },
];

export const ZOOM_MIN = 20;
export const ZOOM_MAX = 400;
export const ZOOM_DEFAULT = 80;
