/** @typedef {import("../types").Difficulty} Difficulty */ /** * @typedef {Object} DifficultySelectProps * @property {(difficulty: Difficulty) => void} onSelect * @property {() => void} onBack */ /** @type {{ key: Difficulty; label: string; desc: string }[]} */ const difficulties = [ { key: "easy", label: "Easy", desc: "6×4 grid • 5 min • 5 hints" }, { key: "medium", label: "Medium", desc: "8×6 grid • 4 min • 3 hints" }, { key: "hard", label: "Hard", desc: "10×8 grid • 3 min • 1 hint" }, ]; /** * @param {DifficultySelectProps} props * @returns {import("react").JSX.Element} */ export function DifficultySelect({ onSelect, onBack }) { return (

Select Difficulty

{difficulties.map((d) => ( ))}
); }