import React, { useMemo, useState } from 'react'; import { templatesRegistry, getTemplateThumbnail, type TemplateCategory } from '../templates/registry'; import { useCvStore, useColorTheme } from '../store/cvStore'; import { colorThemes, colorThemeOrder, type ColorTheme } from '../types/colors'; const TemplateSelectionEditor: React.FC = () => { const templateId = useCvStore(state => state.cv.templateId); const updateTemplateId = useCvStore(state => state.updateTemplateId); const colorTheme = useColorTheme(); const updateColorTheme = useCvStore(state => state.updateColorTheme); const [filter, setFilter] = useState<'All' | TemplateCategory>('All'); const filtered = useMemo(() => { return templatesRegistry.filter(t => filter === 'All' ? true : t.category === filter); }, [filter]); const handleTemplateSelect = (id: string) => { updateTemplateId(id); }; const handleColorSelect = (color: ColorTheme) => { updateColorTheme(color); }; return (

What do you want your CV to look like?

Scroll to view all styles and click to select a specific style.

{/* Color selection */}
{colorThemeOrder.map(color => { if (color === null) { // Default/None option return ( ); } const palette = colorThemes[color]; return (
{/* Filter buttons */}
{(['All', 'ATS', 'Visual'] as const).map(category => ( ))}
{/* Template grid */}
{filtered.map(template => (
{/* Template info */}

{template.name}

{template.category === 'ATS' && ( Recommended )} {template.category === 'Visual' && template.name === 'Smart' && ( Recommended )} {template.category === 'Visual' && template.name === 'Traditional 2' && ( Recommended )}
))}
{/* Additional templates section */}

Need more options? Additional templates are available

{/* Placeholder for additional templates */} {[1, 2, 3, 4].map(i => (
Coming Soon
))}
); }; export default TemplateSelectionEditor;