{"version":3,"file":"LevelBits.BCuAljdQ.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/5AY4jWrGE2i9pazAtjEJ/IzBRlZR26UeeSmfDcVg8/LevelBits.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useLocaleInfo}from\"framer\";import{useState}from\"react\";// Doors into the level test on /level from the rest of the site. Each door\n// opens the quiz straight on its sport: /level#soccer and /level#padel are\n// the anchors LevelQuiz.tsx listens to. The cards reuse the /level sport\n// cards (same photos, shade, type), so the door and the room look alike.\n//\n//   LevelBand  - home: title + the two sport cards\n//   LevelStrip - city and centre pages: one quiet line under the games\n//   LevelRail  - blog article rail: a small card with both sports\nconst PHOTO={soccer:\"https://framerusercontent.com/images/EJ8ldOIi17T9RaK5qHoYQ1FdE.jpg\",padel:\"https://framerusercontent.com/images/t22IbMVv0qtept6bPJc8BrWC6Zc.jpg\"};const T={fr:{title:\"Quel est ton niveau ?\",sub:\"Quelques questions sur ta fa\\xe7on de jouer, et tu sais o\\xf9 tu te situes.\",soccer:\"Foot\",padel:\"Padel\",cta:\"Faire le test\",unsure:\"Tu connais ton niveau ?\",test:\"Fais le test\",level:\"Niveau\",rail:\"Ton niveau, en quelques questions\"},en:{title:\"What's your level?\",sub:\"A few questions about how you play, and you know where you stand.\",soccer:\"Soccer\",padel:\"Padel\",cta:\"Take the test\",unsure:\"Not sure of your level?\",test:\"Take the test\",level:\"Level\",rail:\"Your level, in a few questions\"},es:{title:\"\\xbfCu\\xe1l es tu nivel?\",sub:\"Unas preguntas sobre c\\xf3mo juegas y sabr\\xe1s d\\xf3nde est\\xe1s.\",soccer:\"F\\xfatbol\",padel:\"P\\xe1del\",cta:\"Hacer el test\",unsure:\"\\xbfNo sabes tu nivel?\",test:\"Haz el test\",level:\"Nivel\",rail:\"Tu nivel, en unas preguntas\"},it:{title:\"Qual \\xe8 il tuo livello?\",sub:\"Qualche domanda su come giochi e sai dove ti trovi.\",soccer:\"Calcio\",padel:\"Padel\",cta:\"Fai il test\",unsure:\"Non sai il tuo livello?\",test:\"Fai il test\",level:\"Livello\",rail:\"Il tuo livello, in qualche domanda\"}};const FONT=`\"Plus Jakarta Sans\", system-ui, sans-serif`;const GREEN=\"#00D434\";function useLang(){const{activeLocale}=useLocaleInfo();const c=(activeLocale?.code||\"fr\").slice(0,2).toLowerCase();return T[c]?c:\"fr\";}const href=(lang,sport)=>`${lang===\"fr\"?\"\":\"/\"+lang}/level#${sport}`;function SportCard(props){const t=T[props.lang];const[hover,setHover]=useState(false);return /*#__PURE__*/_jsxs(\"a\",{href:href(props.lang,props.sport),onMouseEnter:()=>setHover(true),onMouseLeave:()=>setHover(false),style:{position:\"relative\",display:\"block\",flex:\"1 1 260px\",minWidth:0,height:props.height,borderRadius:18,overflow:\"hidden\",textDecoration:\"none\",background:\"#18301A\",transform:hover?\"translateY(-3px)\":\"none\",boxShadow:hover?\"0 14px 30px rgba(0,0,0,0.35)\":\"0 6px 16px rgba(0,0,0,0.18)\",transition:\"transform .25s ease, box-shadow .25s ease\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,background:`center / cover url(${PHOTO[props.sport]})`,transform:hover?\"scale(1.04)\":\"scale(1)\",transition:\"transform .6s ease\"}}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,background:\"linear-gradient(180deg, rgba(13,22,13,0.05) 0%, rgba(13,22,13,0.15) 40%, rgba(13,22,13,0.85) 100%)\"}}),/*#__PURE__*/_jsxs(\"div\",{style:{position:\"absolute\",left:20,right:20,bottom:18,display:\"flex\",flexDirection:\"column\",gap:4,fontFamily:FONT},children:[/*#__PURE__*/_jsx(\"span\",{style:{color:\"#FFFFFF\",fontSize:26,fontWeight:800,lineHeight:1.15},children:t[props.sport]}),/*#__PURE__*/_jsxs(\"span\",{style:{color:GREEN,fontSize:15,fontWeight:800},children:[t.cta,\"\\xa0\",\"→\"]})]})]});}/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export function LevelBand(props){const lang=useLang();const t=T[lang];const ink=props.dark?\"#FFFFFF\":\"#141414\";const sub=props.dark?\"rgba(255,255,255,0.72)\":\"#5B6670\";return /*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:20,width:\"100%\",fontFamily:FONT},children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:8},children:[/*#__PURE__*/_jsx(\"span\",{style:{color:ink,fontSize:32,fontWeight:800,lineHeight:1.1,letterSpacing:0},children:t.title}),/*#__PURE__*/_jsx(\"span\",{style:{color:sub,fontSize:16,fontWeight:500,lineHeight:1.5},children:t.sub})]}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",gap:16,flexWrap:\"wrap\"},children:[/*#__PURE__*/_jsx(SportCard,{sport:\"soccer\",lang:lang,height:props.cardHeight??220}),/*#__PURE__*/_jsx(SportCard,{sport:\"padel\",lang:lang,height:props.cardHeight??220})]})]});}addPropertyControls(LevelBand,{dark:{type:ControlType.Boolean,title:\"On dark\",defaultValue:true},cardHeight:{type:ControlType.Number,title:\"Card height\",defaultValue:220}});const pill=dark=>({display:\"inline-flex\",alignItems:\"center\",gap:6,padding:\"7px 12px\",borderRadius:999,textDecoration:\"none\",fontWeight:800,fontSize:14,color:dark?\"#FFFFFF\":\"#141414\",background:dark?\"rgba(255,255,255,0.08)\":\"#FFFFFF\",boxShadow:dark?\"inset 0 0 0 1px rgba(255,255,255,0.16)\":\"0 1px 3px rgba(20,32,40,0.08), inset 0 0 0 1px rgba(20,32,40,0.08)\"});/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export function LevelStrip(props){const lang=useLang();const t=T[lang];const both=props.soccer===undefined&&props.padel===undefined;const sports=[\"soccer\",\"padel\"].filter(s=>both||props[s]);if(!sports.length)return null;return /*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",flexWrap:\"wrap\",gap:\"8px 12px\",fontFamily:FONT},children:[/*#__PURE__*/_jsxs(\"span\",{style:{color:\"#5B6670\",fontSize:14,fontWeight:600},children:[t.unsure,sports.length>1?` ${t.test}${lang===\"fr\"?\"\\xa0:\":\":\"}`:\"\"]}),sports.map(s=>/*#__PURE__*/_jsxs(\"a\",{href:href(lang,s),style:pill(false),children:[sports.length>1?t[s]:t.test,/*#__PURE__*/_jsx(\"span\",{style:{color:\"#005F00\"},children:\"→\"})]},s))]});}addPropertyControls(LevelStrip,{soccer:{type:ControlType.Boolean,title:\"Soccer\"},padel:{type:ControlType.Boolean,title:\"Padel\"}});/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export function LevelRail(){const lang=useLang();const t=T[lang];return /*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:12,padding:22,borderRadius:24,background:\"rgba(255,255,255,0.04)\",boxShadow:\"inset 0 0 0 1px rgba(255,255,255,0.12)\",fontFamily:FONT},children:[/*#__PURE__*/_jsx(\"span\",{style:{color:\"#FFFFFF\",fontSize:18,fontWeight:800,lineHeight:1.3},children:t.rail}),/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",gap:8,flexWrap:\"wrap\"},children:[\"soccer\",\"padel\"].map(s=>/*#__PURE__*/_jsxs(\"a\",{href:href(lang,s),style:pill(true),children:[t[s],/*#__PURE__*/_jsx(\"span\",{style:{color:GREEN},children:\"→\"})]},s))})]});}addPropertyControls(LevelRail,{});\nexport const __FramerMetadata__ = {\"exports\":{\"LevelBand\":{\"type\":\"reactComponent\",\"name\":\"LevelBand\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any\"}},\"LevelStrip\":{\"type\":\"reactComponent\",\"name\":\"LevelStrip\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\"}},\"LevelRail\":{\"type\":\"reactComponent\",\"name\":\"LevelRail\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LevelBits.map"],"mappings":"oLAQ+xC,SAAS,GAAS,CAAC,GAAK,CAAC,gBAAc,EAAc,EAAQ,GAAG,GAAc,MAAM,KAAA,CAAM,MAAM,EAAE,CAAC,CAAC,CAAC,YAAY,EAAE,OAAO,EAAE,GAAG,EAAE,IAAK,CAAsE,SAAS,EAAU,EAAM,CAAC,IAAM,EAAE,EAAE,EAAM,MAAW,CAAC,EAAM,GAAUA,EAAS,EAAK,EAAE,OAAoB,EAAM,IAAI,CAAC,KAAK,EAAK,EAAM,KAAK,EAAM,KAAK,EAAE,iBAAiB,EAAS,EAAI,EAAE,iBAAiB,EAAS,EAAK,EAAE,MAAM,CAAC,SAAS,WAAW,QAAQ,QAAQ,KAAK,YAAY,SAAS,EAAE,OAAO,EAAM,OAAO,aAAa,GAAG,SAAS,SAAS,eAAe,OAAO,WAAW,UAAU,UAAU,EAAM,mBAAmB,OAAO,UAAU,EAAM,+BAA+B,8BAA8B,WAAW,2CAA2C,EAAE,SAAS,CAAc,EAAK,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,MAAM,EAAE,WAAW,sBAAsB,EAAM,EAAM,OAAO,GAAG,UAAU,EAAM,cAAc,WAAW,WAAW,oBAAoB,CAAC,CAAC,EAAe,EAAK,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,MAAM,EAAE,WAAW,oGAAoG,CAAC,CAAC,EAAe,EAAM,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,OAAO,cAAc,SAAS,IAAI,EAAE,WAAW,CAAI,EAAE,SAAS,CAAc,EAAK,OAAO,CAAC,MAA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