import{a as e,r as t,t as n}from"./i18n-CjHYiQIU.js";import{t as r}from"./riddles-BL25uVdU.js";var i=e();function a({difficulty:e,playedIds:a,onStart:o,onBack:s}){let{language:c,strings:l}=n(),u=l.w4.campaignLengthScreen,d=r(e,c),f=d.filter(e=>!a.includes(e.id)).length,p=[5,10,20].filter(e=>e<=f),m=f===d.length;return(0,i.jsxs)(`main`,{className:`screen thorn-screen campaign-length-screen rework-panel-screen`,children:[(0,i.jsxs)(`header`,{className:`screen-heading campaign-length-heading`,children:[(0,i.jsxs)(`div`,{children:[(0,i.jsx)(`p`,{className:`eyebrow`,children:e===`all`?u.mixedDifficulty:l.w4.common.difficulty[e]}),(0,i.jsx)(`h1`,{children:u.title})]}),(0,i.jsx)(`button`,{onClick:s,children:l.w4.common.back})]}),(0,i.jsx)(`section`,{className:`campaign-summary`,children:(0,i.jsxs)(`div`,{className:`campaign-length-grid`,children:[p.map(e=>(0,i.jsxs)(`button`,{onClick:()=>o(e),children:[(0,i.jsx)(`strong`,{children:t(u.riddles,{count:e})}),(0,i.jsx)(`small`,{children:t(u.duration,{min:e*2,max:e*4})})]},e)),m?(0,i.jsx)(`button`,{disabled:!d.length,onClick:()=>o(d.length),children:(0,i.jsx)(`strong`,{children:t(u.allRiddles,{count:d.length})})}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`button`,{disabled:!f,onClick:()=>o(f),children:(0,i.jsx)(`strong`,{children:t(u.allUnplayed,{count:f})})}),(0,i.jsx)(`button`,{disabled:!d.length,onClick:()=>o(d.length),children:(0,i.jsx)(`strong`,{children:t(u.entirePool,{count:d.length})})})]})]})})]})}export{a as CampaignLengthScreen};