'use client'; import React, { useState } from 'react'; import Link from 'next/link'; import { HelpCircle, ArrowRight, Smile, RefreshCcw, Scissors, Palette } from 'lucide-react'; import { KineticText } from '@/components/magicui/kinetic-text'; import { AppItem, resolveLocalised } from '@/types'; interface AppPickerSectionProps { title?: any; subtitle?: any; apps?: AppItem[]; locale?: string; } export function AppPickerSection({ title, subtitle, apps = [], locale = 'en', }: AppPickerSectionProps) { const [photoGoal, setPhotoGoal] = useState('portrait'); const goalOptions = [ { id: 'portrait', title: 'Portraits, Selfies & Skin Beauty', desc: 'Skin retouching, blemish removal, teeth whitening, eye refinement', icon: Smile, appSlug: 'portrait-app', }, { id: 'restoration', title: 'Blurry, Damaged or Old Photos', desc: 'Fixing scratches, sharpening faces, colorizing black & white', icon: RefreshCcw, appSlug: 'photo-enhancer-pro', }, { id: 'cutout', title: 'Background Cutout & Eraser', desc: 'Transparent PNGs, e-commerce products, erasing strangers', icon: Scissors, appSlug: 'bg-cleaner-app', }, { id: 'art', title: 'Anime, Cartoon & Vintage Film Art', desc: 'Cartoon avatars, Polaroid frames, manga illustrations', icon: Palette, appSlug: 'art-studio-app', }, ]; const matchedGoal = goalOptions.find((g) => g.id === photoGoal) || goalOptions[0]; const recommendedApp = apps.find((a) => a.slug === matchedGoal.appSlug) || apps[0]; return (
INTERACTIVE APP MATCHER

{resolveLocalised(title, locale, 'Not Sure Which App You Need?')}

{resolveLocalised(subtitle, locale, 'Select what you want to edit and find your tailored CRE Innovations app.')}

{goalOptions.map((opt) => { const Icon = opt.icon; const isSelected = photoGoal === opt.id; return ( ); })}
{/* Recommended Result Box */} {recommendedApp && (
★ Recommended Match

{resolveLocalised(recommendedApp.name, locale)}

{resolveLocalised(recommendedApp.tagline, locale)}

Get App & 50 Bonus Credits
)}
); }