export interface ThemeColors {
  primary: string;
  secondary: string;
  accent: string;
  error: string;
  bgPrimary: string;
  bgSecondary: string;
  textPrimary: string;
  textSecondary: string;
  textOnPrimary: string;
}

export interface ThemeDefinition {
  id: string;
  name: string;
  description: string;
  light: ThemeColors;
  dark: ThemeColors;
}

/**
 * Single "Warm Sage" theme — the honeyDue brand palette.
 */
export const themes: ThemeDefinition[] = [
  {
    id: "default",
    name: "Warm Sage",
    description: "Calming sage with warm clay accents",
    light: {
      primary: "#6B8F71",
      secondary: "#C4856A",
      accent: "#C4856A",
      error: "#C75B4A",
      bgPrimary: "#FAFAF7",
      bgSecondary: "#F2EFE9",
      textPrimary: "#2D3436",
      textSecondary: "#8A8F87",
      textOnPrimary: "#FFFFFF",
    },
    dark: {
      primary: "#8FB896",
      secondary: "#D4A08A",
      accent: "#D4A08A",
      error: "#E07A6B",
      bgPrimary: "#1A1D1A",
      bgSecondary: "#2A2E2A",
      textPrimary: "#E8E5DF",
      textSecondary: "#9A9E97",
      textOnPrimary: "#1A1D1A",
    },
  },
];

/** Default theme ID */
export const DEFAULT_THEME_ID = "default";

/** Get a theme definition by ID, falls back to Default */
export function getThemeById(id: string): ThemeDefinition {
  return themes.find((t) => t.id === id) ?? themes[0];
}
