export type AppearanceId = 'forest' | 'ocean' | 'sunset' | 'berry';

export interface ThemeColors {
  brand: string;
  brandMuted: string;
  brandLight: string;
  background: string;
  surface: string;
  text: string;
  textMuted: string;
  border: string;
  danger: string;
}

const PALETTES: Record<AppearanceId, ThemeColors> = {
  forest: {
    brand: '#16774c',
    brandMuted: '#1e9a61',
    brandLight: '#e8f5ef',
    background: '#f6f8f7',
    surface: '#ffffff',
    text: '#0f172a',
    textMuted: '#64748b',
    border: '#e2e8f0',
    danger: '#dc2626',
  },
  ocean: {
    brand: '#2563eb',
    brandMuted: '#3b82f6',
    brandLight: '#eff6ff',
    background: '#f8fafc',
    surface: '#ffffff',
    text: '#0f172a',
    textMuted: '#64748b',
    border: '#e2e8f0',
    danger: '#dc2626',
  },
  sunset: {
    brand: '#d97706',
    brandMuted: '#f59e0b',
    brandLight: '#fffbeb',
    background: '#fffaf5',
    surface: '#ffffff',
    text: '#1c1917',
    textMuted: '#78716c',
    border: '#e7e5e4',
    danger: '#dc2626',
  },
  berry: {
    brand: '#7c3aed',
    brandMuted: '#8b5cf6',
    brandLight: '#f5f3ff',
    background: '#faf8ff',
    surface: '#ffffff',
    text: '#1e1b4b',
    textMuted: '#6b7280',
    border: '#e5e7eb',
    danger: '#dc2626',
  },
};

export const APPEARANCE_OPTIONS: Array<{
  id: AppearanceId;
  labelKey: string;
  descriptionKey: string;
  swatch: string;
}> = [
  { id: 'forest', labelKey: 'appearance.forest', descriptionKey: 'appearance.forestDesc', swatch: '#16774c' },
  { id: 'ocean', labelKey: 'appearance.ocean', descriptionKey: 'appearance.oceanDesc', swatch: '#2563eb' },
  { id: 'sunset', labelKey: 'appearance.sunset', descriptionKey: 'appearance.sunsetDesc', swatch: '#d97706' },
  { id: 'berry', labelKey: 'appearance.berry', descriptionKey: 'appearance.berryDesc', swatch: '#7c3aed' },
];

export function getThemeColors(id: AppearanceId): ThemeColors {
  return PALETTES[id];
}
