{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/87YBfWsyQFijpDqkki9b/dxwE37LjCBYI4tjVQbv1/PersonSelectionStep.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";export default function PersonSelectionStep(){const[selected,setSelected]=React.useState(null);const[showCustomInput,setShowCustomInput]=React.useState(false);const[customValue,setCustomValue]=React.useState(\"\");const persons=[1,2,3,4];const redirectToPlanSelection=()=>{setTimeout(()=>{window.location.href=\"/commander-abonnement\"// \u2705 now goes to the plan selection step\n;},300);};const handleSelect=person=>{setSelected(person);localStorage.setItem(\"savure_persons\",person.toString());redirectToPlanSelection();};const handleCustomSubmit=()=>{const number=parseInt(customValue);if(!isNaN(number)&&number>0){setSelected(number);localStorage.setItem(\"savure_persons\",number.toString());redirectToPlanSelection();}else{alert(\"Veuillez entrer un nombre valide.\");}};return /*#__PURE__*/_jsxs(\"div\",{style:{padding:\"60px 24px\",textAlign:\"center\",maxWidth:600,margin:\"0 auto\",boxSizing:\"border-box\"},children:[/*#__PURE__*/_jsxs(\"h2\",{style:{fontFamily:\"Playfair Display, serif\",fontSize:32,fontWeight:500,color:\"#172126\",marginBottom:16,lineHeight:1.4},children:[\"Pour combien de personnes\",/*#__PURE__*/_jsx(\"br\",{}),\"souhaitez-vous commander ?\"]}),/*#__PURE__*/_jsx(\"p\",{style:{fontFamily:\"DM Sans, sans-serif\",fontSize:16,color:\"#172126\",maxWidth:480,margin:\"0 auto 32px\",lineHeight:1.5},children:\"Indiquez le nombre de personnes dans votre foyer. Cela nous permet d\u2019adapter les portions et vous recommander la bonne quantit\\xe9 de plats.\"}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexWrap:\"wrap\",justifyContent:\"center\",gap:16,marginBottom:24},children:[persons.map(person=>{const isActive=selected===person;return /*#__PURE__*/_jsxs(\"div\",{onClick:()=>handleSelect(person),style:{padding:\"16px 20px\",borderRadius:12,border:`2px solid ${isActive?\"#EA580C\":\"#ccc\"}`,backgroundColor:isActive?\"#FFF7ED\":\"#fff\",color:\"#172126\",fontFamily:\"DM Sans, sans-serif\",fontWeight:500,fontSize:16,cursor:\"pointer\",minWidth:140,width:\"calc(50% - 12px)\",maxWidth:180,transition:\"all 0.2s ease\",boxSizing:\"border-box\"},children:[person,\" \",person===1?\"personne\":\"personnes\"]},person);}),/*#__PURE__*/_jsx(\"div\",{onClick:()=>setShowCustomInput(true),style:{padding:\"16px 20px\",borderRadius:12,border:\"2px dashed #ccc\",backgroundColor:\"#f9f9f9\",color:\"#172126\",fontFamily:\"DM Sans, sans-serif\",fontWeight:500,fontSize:16,cursor:\"pointer\",minWidth:140,width:\"calc(50% - 12px)\",maxWidth:180,transition:\"all 0.2s ease\",boxSizing:\"border-box\"},children:\"+ Autre\"})]}),showCustomInput&&/*#__PURE__*/_jsxs(\"div\",{style:{marginTop:16},children:[/*#__PURE__*/_jsx(\"input\",{type:\"number\",min:\"1\",value:customValue,onChange:e=>setCustomValue(e.target.value),placeholder:\"Nombre de personnes\",style:{padding:\"16px 20px\",borderRadius:8,border:\"1px solid #ccc\",fontSize:18,fontFamily:\"DM Sans, sans-serif\",width:\"100%\",maxWidth:300,marginBottom:12,boxSizing:\"border-box\"}}),/*#__PURE__*/_jsx(\"br\",{}),/*#__PURE__*/_jsx(\"button\",{onClick:handleCustomSubmit,style:{padding:\"12px 28px\",borderRadius:8,backgroundColor:\"#EA580C\",color:\"#fff\",fontFamily:\"DM Sans, sans-serif\",fontWeight:500,fontSize:16,border:\"none\",cursor:\"pointer\"},children:\"Valider\"})]})]});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PersonSelectionStep\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PersonSelectionStep.map"],
  "mappings": "2FAAoG,SAARA,GAAsC,CAAC,GAAK,CAACC,EAASC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"selected", "setSelected", "ye", "showCustomInput", "setShowCustomInput", "customValue", "setCustomValue", "persons", "redirectToPlanSelection", "window", "handleSelect", "person", "handleCustomSubmit", "number", "u", "p", "isActive"]
}
