"use client"; import React, { useState } from "react"; import { Check, ArrowLeft, Wand2 } from "lucide-react"; import { BoothConfig, BoothStyle } from "@/types/booth"; import { useI18n } from "@/lib/i18n"; import { MascotGuide } from "@/components/MascotGuide"; interface StyleScreenProps { config: BoothConfig; styles: BoothStyle[]; onStyleSelected: (style: BoothStyle) => void; onBack: () => void; } export const StyleScreen: React.FC = ({ config, styles, onStyleSelected, onBack, }) => { const { t } = useI18n(); const [selectedId, setSelectedId] = useState(styles[0]?.id || ""); const handleConfirm = () => { const chosen = styles.find((s) => s.id === selectedId) || styles[0]; if (chosen) { onStyleSelected(chosen); } }; const currentStyle = styles.find((s) => s.id === selectedId); return (
{/* Top Header - Back on left, Confirm on right */}
{/* Top-Right Confirm / Transform Button - Clean text, no icon */}
{/* Main Styles Grid (2x2) with Game Stone/Wood Frame Card Styling - Moved down with spacing */}
{styles.map((style) => { const isSelected = selectedId === style.id; const styleName = t(style.name); return (
setSelectedId(style.id)} className={`relative flex flex-col items-center p-2.5 rounded-2xl cursor-pointer transition-all duration-200 ${ isSelected ? "game-panel-amber ring-2 ring-amber-400 scale-[1.03] shadow-[0_8px_25px_rgba(249,115,22,0.6)]" : "game-panel opacity-85 hover:opacity-100 hover:border-purple-400/80" }`} > {isSelected && (
)} {/* Artwork Thumbnail */}
{/* eslint-disable-next-line @next/next/no-img-element */} {styleName}
{/* Title & Tag */}
{styleName}
); })}
{/* Selected Style Description Card & Mascot Comic Guide - Lifted up to slightly overlay bottom of style cards */}
); };