@simple-parlay/components 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +5 -6
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.mjs +4 -5
- package/dist/react-native/index.cjs +1 -1
- package/dist/react-native/index.mjs +4 -5
- package/package.json +1 -1
|
@@ -336,11 +336,10 @@ return E(W,n?{style:[fd.splitCard,{borderRadius:en(a,16),borderColor:g.border,ba
|
|
|
336
336
|
return E(W,{style:{paddingBottom:16},children:[Q.map(e=>{/* @__PURE__ */return E(W,{children:[e.label?(t=e.label,/* @__PURE__ */E(W,{style:fd.dayHeader,children:[/* @__PURE__ */U(lo,{style:[fd.dayLabel,{color:on(S),fontFamily:k}],children:t}),/* @__PURE__ */U(W,{style:[fd.rule,{backgroundColor:T}]})]})):null,e.events.map(Te)]},e.key);var t}),B&&/* @__PURE__ */U(Vc,{propositions:B.props.filter(e=>!ne(e)),title:B.title,onClose:()=>M(null)})]})}function hd({theme:e,selected:t,onPress:n,style:o,children:i}){const{hovered:r,pressed:l,handlers:a}=fo(),s=t?null:eo(e.colors.primary,{hovered:r,pressed:l});/* @__PURE__ */
|
|
337
337
|
return U(z,{...a,activeOpacity:1,accessibilityRole:"button",accessibilityState:{selected:t},onPress:n,style:[o,s&&{backgroundColor:s.background},go(l)],children:i})}function ud({color:e}){/* @__PURE__ */
|
|
338
338
|
return U(F,{width:14,height:14,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */U(D,{d:"m6 9 6 6 6-6",stroke:e,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}var fd=k.create({question:{flexDirection:"row",alignItems:"flex-start",gap:8,minWidth:0,flex:1},dayHeader:{flexDirection:"row",alignItems:"center",gap:8,marginTop:16,marginBottom:8},dayLabel:{fontSize:11,fontWeight:"700",letterSpacing:.3},rule:{flex:1,height:1},shortLabel:{fontSize:11.5,fontWeight:"700",lineHeight:15},vs:{fontSize:9,fontWeight:"600",paddingHorizontal:2},count:{fontSize:10,fontWeight:"600"},splitTitle:{fontSize:11,fontWeight:"700",flexShrink:1},slotChip:{borderWidth:1,paddingHorizontal:6,paddingVertical:1},slotChipText:{fontSize:8.5,fontWeight:"700",letterSpacing:.25,textTransform:"uppercase"},foldedCount:{fontSize:11,paddingHorizontal:12},time:{fontSize:9.5,fontWeight:"500"},foldedStrip:{flexDirection:"row",alignItems:"center",borderWidth:1,overflow:"hidden",marginBottom:8},foldedStub:{flexDirection:"row",alignItems:"center",gap:4,alignSelf:"stretch",borderRightWidth:1,paddingHorizontal:8,paddingVertical:6},splitCard:{flexDirection:"row",alignItems:"stretch",borderWidth:1,overflow:"hidden",marginBottom:8},splitStub:{width:96,alignItems:"center",justifyContent:"center",gap:6,borderRightWidth:1,paddingHorizontal:8,paddingVertical:12},splitCountRow:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:12,paddingVertical:6,borderBottomWidth:1},splitBody:{justifyContent:"center",gap:12,paddingHorizontal:12,paddingVertical:10},compactCard:{borderWidth:1,overflow:"hidden",marginBottom:8},compactHeader:{flexDirection:"row",alignItems:"center",gap:6,minWidth:0,paddingHorizontal:12,paddingVertical:8},compactTime:{fontSize:9,fontWeight:"500"},compactRow:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:12,paddingVertical:10,borderTopWidth:1}}),gd=12;function pd({matchup:e,renderTeamLogo:t,altText:n,mutedColor:o,size:i="sm"}){const{width:r}=P(),l=r>=640,[a,s=""]=e.split(" vs "),c=s.length>0,d="md"===i&&l?16:14;if(!c)/* @__PURE__ */return U(lo,{style:{color:n,fontSize:d,fontWeight:"600"},children:e});const h=e=>/* @__PURE__ */E(W,{style:md.teamLogoRowWrap,children:[t?.(e),/* @__PURE__ */U(lo,{style:{color:n,fontSize:d,fontWeight:"600",flexShrink:1},children:e})]}),u=/* @__PURE__ */U(lo,{style:{color:o,fontSize:12,flexShrink:0},children:"vs"});/* @__PURE__ */
|
|
339
|
-
return E(W,l?{style:md.matchupTeamsRow,children:[h(a),u,h(s)]}:{style:md.matchupTeamsStacked,children:[u,/* @__PURE__ */E(W,{style:{flexShrink:1,minWidth:0},children:[h(a),h(s)]})]})}function yd({game:t,propositions:n,selections:o,onToggleSelection:i,onNext:a,onBack:c,loading:d,error:h,theme:u,colorScheme:f,hideActions:g=!1,initialSport:p,renderTeamLogo:y,disableQuickPick:m=!1,selectedPropositionCount:b,onPropositionCountChange:w,gameCategory:v,headerExtra:x,railSlot:k,variant:S,disableEventSwipe:T}){const L=r(xl),B=fr(t),M=B&&L&&!$n(L.uiVariant)?br(L.correlation,Object.keys(o).length):null,A=L?.sportBaseKey,H=L?.compositeComponentById,R=S??L?.selectionVariant??("playbook"===L?.uiVariant?"shelf":L?.uiVariant&&"default"!==L.uiVariant?L.uiVariant:void 0),I=T??L?.disableEventSwipe??!1,j=Fn(u,f),O=j.colors,G=aa(j).colors,N=pn(j),Y=mn(j),X=O.matchupHeader??(t.color?Jt(t.color,.14):yn(j))
|
|
340
|
-
return E(W,{style:{gap:Vn(L?.uiVariant)?0:
|
|
341
|
-
return E(W,{style:{
|
|
342
|
-
return
|
|
343
|
-
return U(W,{style:{paddingHorizontal:16,paddingVertical:Q?14:12,backgroundColor:Y,borderTopColor:O.border,borderTopWidth:n?1:0,opacity:c?.45:1,borderBottomLeftRadius:r?en(j,gd):0,borderBottomRightRadius:r?en(j,gd):0},children:/* @__PURE__ */E(W,{style:{flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",alignItems:"center",columnGap:Q?16:8,rowGap:Q?16:8},children:[/* @__PURE__ */E(W,{style:{flex:1,minWidth:128,flexDirection:"row",alignItems:"flex-start",gap:8},children:[gc(t,y,e),/* @__PURE__ */U(mc,{id:t.id,kind:"text",children:/* @__PURE__ */U(yc,{prop:t,colors:O,size:"md",componentById:H,renderTeamLogo:y,theme:j})})]}),/* @__PURE__ */U(mc,{id:t.id,kind:"answers",children:/* @__PURE__ */U(Po,{yesDisabled:!(i||!L?.canSelectAnswer||L.canSelectAnswer(t.id,"yes")),noDisabled:!(i||!L?.canSelectAnswer||L.canSelectAnswer(t.id,"no")),theme:j,size:"sm",value:l?"yes":a?"no":null,onYes:()=>i?L?.swapSelection(t.id,"yes",i()):ye(t.id,"yes"),onNo:()=>i?L?.swapSelection(t.id,"no",i()):ye(t.id,"no"),disabled:c})})]})},t.id)},r=ze(t);return r.some(e=>e.family)?r.map(e=>/* @__PURE__ */U(sd,{theme:j,group:e,selections:o,caps:pe,game:L?.selectedGame,pool:n,componentById:H,pickOrder:L?.pickOrder,rowsBackground:Y,renderRow:i},e.family??"other")):t.map((e,n)=>i(e,{top:n>0},n===t.length-1))})()})})]},e)})}),0===n.length&&!(B&&L?.correlation.loading)&&/* @__PURE__ */U(W,{style:md.centered,children:/* @__PURE__ */U(lo,{style:{color:G.textMuted},children:"No propositions available at this time"})}),!g&&/* @__PURE__ */E(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderTopWidth:1,borderTopColor:O.border,backgroundColor:N,marginHorizontal:Q?-24:-16,paddingHorizontal:Q?24:16,paddingVertical:Q?16:12},children:[/* @__PURE__ */U(po,{theme:j,size:"lg",variant:"secondary",onPress:c,children:"Back"}),/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:Q?12:8},children:/* @__PURE__ */U(po,{theme:j,size:"lg",disabled:!ue,onPress:a,children:"Wager"})})]})]})}var md=k.create({centered:{alignItems:"center",justifyContent:"center",padding:32,flexDirection:"row"},filterToggleRow:{flexDirection:"row",alignItems:"center",gap:8},topBar:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:8},quickPickRow:{flexDirection:"row",alignItems:"center",flexShrink:0},quickPickCountRow:{flexDirection:"row",alignItems:"center",gap:4},quickPickInput:{borderWidth:2,fontWeight:"600",textAlign:"center"},matchupList:{gap:16},matchupCard:{borderWidth:1,overflow:"visible"},matchupHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:16,paddingVertical:14},matchupHeaderLeft:{flexDirection:"row",alignItems:"center",gap:8,flex:1,minWidth:0},matchupTeamWrapper:{flex:1,minWidth:0},matchupTeamsRow:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:6,rowGap:4},matchupTeamsStacked:{flexDirection:"row",alignItems:"center",gap:6,alignSelf:"stretch"},teamLogoRowWrap:{flexDirection:"row",alignItems:"center",gap:4,flexShrink:1,minWidth:0},matchupHeaderRight:{flexDirection:"row",alignItems:"center",gap:8,marginLeft:8,flexShrink:0},answeredBadge:{paddingHorizontal:8,paddingVertical:2},slotChip:{borderWidth:1,paddingHorizontal:6,paddingVertical:1},slotChipText:{fontSize:9,fontWeight:"700",letterSpacing:.25,textTransform:"uppercase"}});function bd({propositions:e,selections:t,onToggleSelection:n,onNext:o,onBack:i,theme:r,colorScheme:l,hideActions:a=!1,renderTeamLogo:s,allowAnswerToggle:c=!0,gameName:h,potentialPayout:u,defaultExpanded:f=!1,componentById:g,addMorePicks:p}){const y="shelf"===Nn(),m=Fn(r,l),b=m.colors,w=pn(m),v=$r(m),x=on(m),k=b.textAlt??b.text,{width:S}=P(),C=S>=640,T=function(e){return{shadowColor:"#000",shadowOpacity:"dark"===e.colorScheme?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2}}(m),[L,B]=d(f),M=e.filter(e=>e.id in t),A=M.length,H=Xt(M),R=b.matchupHeader??yn(m),I=mn(m),j=C?16:12;/* @__PURE__ */
|
|
339
|
+
return E(W,l?{style:md.matchupTeamsRow,children:[h(a),u,h(s)]}:{style:md.matchupTeamsStacked,children:[u,/* @__PURE__ */E(W,{style:{flexShrink:1,minWidth:0},children:[h(a),h(s)]})]})}function yd({game:t,propositions:n,selections:o,onToggleSelection:i,onNext:a,onBack:c,loading:d,error:h,theme:u,colorScheme:f,hideActions:g=!1,initialSport:p,renderTeamLogo:y,disableQuickPick:m=!1,selectedPropositionCount:b,onPropositionCountChange:w,gameCategory:v,headerExtra:x,railSlot:k,variant:S,disableEventSwipe:T}){const L=r(xl),B=fr(t),M=B&&L&&!$n(L.uiVariant)?br(L.correlation,Object.keys(o).length):null,A=L?.sportBaseKey,H=L?.compositeComponentById,R=S??L?.selectionVariant??("playbook"===L?.uiVariant?"shelf":L?.uiVariant&&"default"!==L.uiVariant?L.uiVariant:void 0),I=T??L?.disableEventSwipe??!1,j=Fn(u,f),O=j.colors,G=aa(j).colors,N=pn(j),Y=mn(j),X=O.matchupHeader??(t.color?Jt(t.color,.14):yn(j));O.textAlt??O.text,$r(j),Zr(j),on(j);const{width:q}=P(),J=q>=640,Q=function(e){return{shadowColor:"#000",shadowOpacity:"dark"===e.colorScheme?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2}}(j),K=!!(t.allowed_propositions&&t.allowed_propositions.length>0),{min:Z,max:$}=vt(t,b),_=Z,ee=$,[te,ne]=e.useState(()=>new Set(Object.keys(Yt(n,v,A))));e.useEffect(()=>{const e=Yt(n,v,A),t=Object.keys(e);t.length>0&&ne(e=>t.every(t=>e.has(t))?e:new Set(t))},[n]);const oe=_>0&&_===ee,ie=_||1,re=ee||n.length,le=ee||_||n.length,[ae,se]=e.useState(le),ce=Object.keys(o).length,de=ee>0&&ce>=ee,he=K?null!=b&&ce===b:bt(ce,t.min_propositions,t.max_propositions);t.min_bet,ee>0?Math.max(2,2*ee):Math.max(2,2*ce);const ue=e.useRef(ce),fe=K?null!=b&&ce===b:ee>0&&ce===ee;l(()=>{!B&&fe&&ce>ue.current&&a?.(),ue.current=ce},[ce,fe]);const ge=s(()=>Se(n,o,H,t),[n,o,H,t]);s(()=>n.some(e=>null!==be(e)),[n]);const pe=(e,t)=>{if(e in o)return void i(e,t);if(de)return;const r=n.find(t=>t.id===e);r&&!B&&ge.isCapped(r)||i(e,t)};l(()=>{const e=ee||n.length,t=_||1;se(n=>oe?ee:Math.max(t,Math.min(n,e)))},[n.length,_,ee,oe]);const ye=s(()=>kt(v,n,A),[v,n,A]),me=s(()=>Yt(n,v,A),[n,v,A]),we=Object.keys(me);if(d)/* @__PURE__ */return U(wc,{theme:j,variant:R,sports:k?L?.sportOptions.length??0:void 0,actions:!!x,headerBg:X,shadow:Q,logos:!!y,swipe:!I});if(h)/* @__PURE__ */return U(W,{style:md.centered,children:/* @__PURE__ */U(lo,{style:{color:O.error},children:h})});const ve=!m&&n.length>0;/* @__PURE__ */
|
|
340
|
+
return E(W,{style:{gap:Vn(L?.uiVariant)?0:J?24:16,paddingBottom:Vn(L?.uiVariant)?0:64},children:[(()=>{const e=x?/* @__PURE__ */U(W,{style:md.filterToggleRow,children:x}):null;return e||k?"function"==typeof k?k(e):/* @__PURE__ */E(W,{style:{gap:10},children:[k,e]}):null})(),ve&&/* @__PURE__ */U(W,{style:[md.topBar,{justifyContent:"flex-end"}],children:/* @__PURE__ */E(W,{style:[md.quickPickRow,{gap:J?8:6}],children:[!oe&&/* @__PURE__ */E(W,{style:md.quickPickCountRow,children:[/* @__PURE__ */U(C,{keyboardType:"number-pad",accessibilityLabel:"QuickPick count",value:String(ae),onChangeText:e=>{const t=parseInt(e,10);isNaN(t)||se(Math.max(ie,Math.min(re,t)))},style:[md.quickPickInput,{borderRadius:en(j,8),width:J?56:40,paddingHorizontal:J?8:4,paddingVertical:J?6:4,fontSize:J?14:12,color:G.textAlt??G.text,backgroundColor:G.backgroundAlt,borderColor:G.border}]}),/* @__PURE__ */E(lo,{style:{color:G.textMuted,fontSize:12},children:["/ ",n.length]})]}),/* @__PURE__ */U(rs,{onPress:()=>{const e=oe?ee:ae;for(const n of Object.keys(o)){const e=Number(n);i(e,o[e])}const{yesPicks:t,noPicks:r}=function(e,t){const n=[...e].sort(()=>Math.random()-.5).slice(0,t),o=[],i=[];for(const r of n)Math.random()<.5?o.push(r):i.push(r);return{yesPicks:o,noPicks:i}}(n,e);for(const n of t)i(n.id,"yes");for(const n of r)i(n.id,"no");a?.()}})]})}),"recalculating"===M&&/* @__PURE__ */U(W,{testID:"correlation-loading",accessibilityLiveRegion:"polite",accessibilityLabel:"Updating your picks…",style:{height:0}}),"stuck"===M&&/* @__PURE__ */U(W,{pointerEvents:"none",style:{position:"absolute",top:16,left:16,right:16,zIndex:50,alignItems:"center"},children:/* @__PURE__ */U(W,{testID:"correlation-stuck",accessibilityLiveRegion:"polite",style:{maxWidth:360,paddingHorizontal:20,paddingVertical:12,borderRadius:en(j,16),borderWidth:1,borderColor:O.warning,backgroundColor:O.warningBg,elevation:10},children:/* @__PURE__ */U(lo,{style:{color:O.warningText,fontSize:14,fontWeight:"600",textAlign:"center"},children:wr})})}),n.length>0&&R?/* @__PURE__ */U(dd,{variant:R,groups:me,racing:ye,selections:o,onToggleSelection:pe,atMax:de,theme:j,renderTeamLogo:y,componentById:H,disableEventSwipe:I}):null,n.length>0&&!R&&/* @__PURE__ */U(W,{style:md.matchupList,children:we.map(e=>{const t=me[e],i=te.has(e),r=t.filter(e=>e.id in o).length,l=t[0]?.commence_time;/* @__PURE__ */
|
|
341
|
+
return E(W,{style:[md.matchupCard,{borderRadius:en(j,gd),borderColor:O.border,backgroundColor:N},Q],children:[/* @__PURE__ */U(z,{onPress:()=>{return t=e,ne(e=>{const n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n});var t},style:[md.matchupHeader,{paddingHorizontal:0,paddingVertical:0},{backgroundColor:X,borderTopLeftRadius:en(j,gd),borderTopRightRadius:en(j,gd),borderBottomLeftRadius:i?0:gd,borderBottomRightRadius:i?0:gd}],children:/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:/* @__PURE__ */U(id,{theme:j,title:e,...Kc(e,ye),racing:ye,date:l?new Date(l):null,renderTeamLogo:y,trailing:/* @__PURE__ */E(V,{children:[r>0&&/* @__PURE__ */U(W,{style:[md.answeredBadge,{borderRadius:en(j,999),backgroundColor:O.successBg}],children:/* @__PURE__ */E(lo,{style:{color:O.successText,fontSize:12,fontWeight:"500"},children:[r,"/",t.length]})}),/* @__PURE__ */U(F,{width:18,height:18,viewBox:"0 0 24 24",style:{flexShrink:0,transform:[{rotate:i?"180deg":"0deg"}]},children:/* @__PURE__ */U(D,{d:"m6 9 6 6 6-6",stroke:O.textAltMuted??O.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})})]})})})}),i&&/* @__PURE__ */U(W,{children:/* @__PURE__ */U(V,{children:(()=>{const i=(t,{top:n,swap:i},r=!1)=>{const l="yes"===o[t.id],a="no"===o[t.id],s=t.id in o,c=!i&&(de&&!s||!B&&ge.isCapped(t));/* @__PURE__ */
|
|
342
|
+
return U(W,{style:{paddingHorizontal:16,paddingVertical:J?14:12,backgroundColor:Y,borderTopColor:O.border,borderTopWidth:n?1:0,opacity:c?.45:1,borderBottomLeftRadius:r?en(j,gd):0,borderBottomRightRadius:r?en(j,gd):0},children:/* @__PURE__ */E(W,{style:{flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",alignItems:"center",columnGap:J?16:8,rowGap:J?16:8},children:[/* @__PURE__ */E(W,{style:{flex:1,minWidth:128,flexDirection:"row",alignItems:"flex-start",gap:8},children:[gc(t,y,e),/* @__PURE__ */U(mc,{id:t.id,kind:"text",children:/* @__PURE__ */U(yc,{prop:t,colors:O,size:"md",componentById:H,renderTeamLogo:y,theme:j})})]}),/* @__PURE__ */U(mc,{id:t.id,kind:"answers",children:/* @__PURE__ */U(Po,{yesDisabled:!(i||!L?.canSelectAnswer||L.canSelectAnswer(t.id,"yes")),noDisabled:!(i||!L?.canSelectAnswer||L.canSelectAnswer(t.id,"no")),theme:j,size:"sm",value:l?"yes":a?"no":null,onYes:()=>i?L?.swapSelection(t.id,"yes",i()):pe(t.id,"yes"),onNo:()=>i?L?.swapSelection(t.id,"no",i()):pe(t.id,"no"),disabled:c})})]})},t.id)},r=ze(t);return r.some(e=>e.family)?r.map(e=>/* @__PURE__ */U(sd,{theme:j,group:e,selections:o,caps:ge,game:L?.selectedGame,pool:n,componentById:H,pickOrder:L?.pickOrder,rowsBackground:Y,renderRow:i},e.family??"other")):t.map((e,n)=>i(e,{top:n>0},n===t.length-1))})()})})]},e)})}),0===n.length&&!(B&&L?.correlation.loading)&&/* @__PURE__ */U(W,{style:md.centered,children:/* @__PURE__ */U(lo,{style:{color:G.textMuted},children:"No propositions available at this time"})}),!g&&/* @__PURE__ */E(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderTopWidth:1,borderTopColor:O.border,backgroundColor:N,marginHorizontal:J?-24:-16,paddingHorizontal:J?24:16,paddingVertical:J?16:12},children:[/* @__PURE__ */U(po,{theme:j,size:"lg",variant:"secondary",onPress:c,children:"Back"}),/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:J?12:8},children:/* @__PURE__ */U(po,{theme:j,size:"lg",disabled:!he,onPress:a,children:"Wager"})})]})]})}var md=k.create({centered:{alignItems:"center",justifyContent:"center",padding:32,flexDirection:"row"},filterToggleRow:{flexDirection:"row",alignItems:"center",gap:8},topBar:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:8},quickPickRow:{flexDirection:"row",alignItems:"center",flexShrink:0},quickPickCountRow:{flexDirection:"row",alignItems:"center",gap:4},quickPickInput:{borderWidth:2,fontWeight:"600",textAlign:"center"},matchupList:{gap:16},matchupCard:{borderWidth:1,overflow:"visible"},matchupHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:16,paddingVertical:14},matchupHeaderLeft:{flexDirection:"row",alignItems:"center",gap:8,flex:1,minWidth:0},matchupTeamWrapper:{flex:1,minWidth:0},matchupTeamsRow:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:6,rowGap:4},matchupTeamsStacked:{flexDirection:"row",alignItems:"center",gap:6,alignSelf:"stretch"},teamLogoRowWrap:{flexDirection:"row",alignItems:"center",gap:4,flexShrink:1,minWidth:0},matchupHeaderRight:{flexDirection:"row",alignItems:"center",gap:8,marginLeft:8,flexShrink:0},answeredBadge:{paddingHorizontal:8,paddingVertical:2},slotChip:{borderWidth:1,paddingHorizontal:6,paddingVertical:1},slotChipText:{fontSize:9,fontWeight:"700",letterSpacing:.25,textTransform:"uppercase"}});function bd({propositions:e,selections:t,onToggleSelection:n,onNext:o,onBack:i,theme:r,colorScheme:l,hideActions:a=!1,renderTeamLogo:s,allowAnswerToggle:c=!0,gameName:h,potentialPayout:u,defaultExpanded:f=!1,componentById:g,addMorePicks:p}){const y="shelf"===Nn(),m=Fn(r,l),b=m.colors,w=pn(m),v=$r(m),x=on(m),k=b.textAlt??b.text,{width:S}=P(),C=S>=640,T=function(e){return{shadowColor:"#000",shadowOpacity:"dark"===e.colorScheme?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2}}(m),[L,B]=d(f),M=e.filter(e=>e.id in t),A=M.length,H=Xt(M),R=b.matchupHeader??yn(m),I=mn(m),j=C?16:12;/* @__PURE__ */
|
|
344
343
|
return E(W,{style:{gap:C?24:16,paddingBottom:64},children:[
|
|
345
344
|
/* @__PURE__ */E(W,{style:[wd.section,{borderRadius:en(m,12),padding:C?24:16,backgroundColor:w,borderColor:b.border},T],children:[
|
|
346
345
|
/* @__PURE__ */E(z,{onPress:()=>B(e=>!e),accessibilityRole:"button",accessibilityState:{expanded:L},style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",gap:12},children:[/* @__PURE__ */E(W,{style:{flexDirection:"row",alignItems:"center",gap:8,flex:1,minWidth:0},children:[/* @__PURE__ */U(F,{width:18,height:18,viewBox:"0 0 24 24",style:{flexShrink:0,transform:[{rotate:L?"180deg":"0deg"}]},children:/* @__PURE__ */U(D,{d:"m6 9 6 6 6-6",stroke:b.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})}),/* @__PURE__ */E(W,{style:{flex:1,minWidth:0},children:[/* @__PURE__ */E(W,{style:{flexDirection:"row",alignItems:"center",gap:8},children:[/* @__PURE__ */U(lo,{style:{fontSize:C?18:16,fontWeight:"600",color:x,fontFamily:v},children:"Your Selections"}),/* @__PURE__ */U(W,{style:{backgroundColor:b.primary,paddingHorizontal:6,paddingVertical:2,borderRadius:en(m,999)},children:/* @__PURE__ */U(lo,{style:{color:b.primaryText,fontSize:12,fontWeight:"600"},children:A})})]}),h&&/* @__PURE__ */U(lo,{numberOfLines:1,style:{color:b.textMuted,fontSize:14,marginTop:2},children:h})]})]}),null!=u&&u>0&&/* @__PURE__ */E(W,{style:{alignItems:"flex-end",flexShrink:0},children:[/* @__PURE__ */U(lo,{style:{color:b.textMuted,fontSize:10,textTransform:"uppercase",letterSpacing:.25},children:"Potential Payout"}),/* @__PURE__ */U(lo,{style:{color:x,fontSize:14,fontWeight:"700"},children:ct(u)})]})]}),p&&p.remaining>0&&/* @__PURE__ */E(W,{style:{marginTop:j,padding:12,borderRadius:en(m,8),backgroundColor:`${b.primary}12`,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[/* @__PURE__ */E(lo,{style:{flex:1,color:b.textMuted,fontSize:12},children:[1===p.remaining?"Add ":"Add up to ",
|