/*
 * melissaThemes — catalogo dos "Temas" do Melissa.
 *
 * Cada tema bundla wallpaper + cor primaria + preset (Lara/Nora) + surface.
 * Usado por:
 *   - MelissaSettingsPanel: renderiza os cards e aplica via applyTheme
 *   - MelissaLayout: resolve themeName -> image no boot pra restaurar
 *     o wallpaper sem precisar guardar a data URL inteira no DB
 *
 * Adicionar um novo tema: estender o array com { name, image, primary,
 * preset, surface }. O nome serve como ID persistido em melissa_prefs.
 */
import freudImg from '@/assets/themes/freudwebp.webp';
import kleinImg from '@/assets/themes/melainewebp.webp';
import jungImg  from '@/assets/themes/jungwebp.webp';

export const MELISSA_THEMES = Object.freeze([
    { name: 'Freud', image: freudImg, primary: 'noir',   preset: 'Lara', surface: 'slate' },
    { name: 'Klein', image: kleinImg, primary: 'rose',   preset: 'Nora', surface: 'stone' },
    { name: 'Jung',  image: jungImg,  primary: 'purple', preset: 'Nora', surface: 'zinc'  }
]);

export const MELISSA_THEME_NAMES = new Set(MELISSA_THEMES.map((t) => t.name));

export function findMelissaTheme(name) {
    if (!name) return null;
    return MELISSA_THEMES.find((t) => t.name === name) || null;
}
