import{a as e,r as t,t as n}from"./i18n-CjHYiQIU.js";import{n as r}from"./riddles-BL25uVdU.js";var i=e();function a({completedIds:e,bestResults:a,currentId:o,onPlay:s,onBack:c}){let{language:l,strings:u}=n(),d=u.w4.selectionScreen,f=u.w4.common.difficulty,p=r(l);return(0,i.jsxs)(`main`,{className:`screen selection-screen rework-panel-screen`,children:[(0,i.jsxs)(`header`,{className:`screen-heading`,children:[(0,i.jsxs)(`div`,{children:[(0,i.jsx)(`p`,{className:`eyebrow`,children:d.eyebrow}),(0,i.jsx)(`h1`,{children:d.title})]}),(0,i.jsx)(`button`,{onClick:c,children:d.menu})]}),(0,i.jsx)(`div`,{className:`riddle-grid`,children:p.map((n,r)=>{let c=e.includes(n.id);return(0,i.jsxs)(`button`,{type:`button`,className:`riddle-card ${c?`solved`:``}`,onClick:()=>s(n.id),children:[(0,i.jsx)(`span`,{className:`card-number`,children:String(r+1).padStart(3,`0`)}),(0,i.jsx)(`span`,{className:`difficulty ${n.metadata.difficulty}`,children:f[n.metadata.difficulty]}),(0,i.jsx)(`strong`,{children:n.title}),(0,i.jsx)(`span`,{children:c?d.solved:o===n.id?d.current:d.unsolved}),(0,i.jsx)(`small`,{children:a[n.id]?t(d.bestPoints,{score:a[n.id].score}):d.noResult})]},n.id)})})]})}export{a as SelectionScreen};