import{j as e,u as t,r as o}from"./vendor-utils-BvYwFWT7.js";import{r,d as s,a as l}from"./wizard.js";import{d as i}from"./AccessTimeRounded-BI27XMHs.js";import{i as n,B as c,T as a,G as d,o as x,q as f,s as p}from"./vendor-ui-12RU7iXG.js";var h={},m=n;Object.defineProperty(h,"__esModule",{value:!0});var u=h.default=void 0,b=m(r()),g=e;const j={day:l,slot:i,service:u=h.default=(0,b.default)([(0,g.jsx)("path",{d:"m21.67 18.17-4.72-4.72c-.48-.48-.99-.59-1.58-.59l-2.54 2.54c0 .59.11 1.11.59 1.58l4.72 4.72c.39.39 1.02.39 1.41 0l2.12-2.12c.39-.38.39-1.02 0-1.41"},"0"),(0,g.jsx)("path",{d:"M16.63 9.49c.39.39 1.02.39 1.41 0l.71-.71 2.12 2.12c1.17-1.17 1.17-3.07 0-4.24l-2.83-2.83a.9959.9959 0 0 0-1.41 0l-.71.71V2c0-.62-.76-.95-1.21-.5l-2.54 2.54c-.45.45-.12 1.21.5 1.21h2.54l-.71.71c-.39.39-.39 1.02 0 1.41l.35.35-2.89 2.89-4.11-4.13v-1c0-.27-.11-.52-.29-.71L5.54 2.74a.9959.9959 0 0 0-1.41 0L2.71 4.16c-.39.39-.39 1.02 0 1.41L4.73 7.6c.19.19.44.29.71.29h1l4.13 4.13-.85.85h-1.3c-.53 0-1.04.21-1.41.59l-4.72 4.72c-.39.39-.39 1.02 0 1.41l2.12 2.12c.39.39 1.02.39 1.41 0l4.72-4.72c.38-.38.59-.88.59-1.41v-1.29l5.15-5.15z"},"1")],"HandymanRounded"),product:s},y={day:{color:"#1976d2",bgColor:"#e3f2fd"},slot:{color:"#7b1fa2",bgColor:"#f3e5f5"},service:{color:"#388e3c",bgColor:"#e8f5e9"},product:{color:"#ed6c02",bgColor:"#fff3e0"}};function v({wizardData:r,updateStepData:s,onNext:l,isMobile:i}){const{t:n}=t(),h=r.step_1||{},m=h.offer_type,b=o.useMemo(()=>{const e=window.wahrbWizardConfig?.serviceTypes||{};return Object.entries(e).map(([e,t])=>({key:e,icon:j[e]||u,color:y[e]?.color||"#64748b",bgColor:y[e]?.bgColor||"#f1f5f9",title:t.title||n(`step1.${e}.title`),description:t.description||n(`step1.${e}.description`)}))},[n]),g=o.useCallback(e=>{s("step_1",{...h,offer_type:e}),setTimeout(l,300)},[h,s,l]);return 0===b.length?e.jsx(c,{sx:{py:4,textAlign:"center"},children:e.jsx(a,{variant:"h6",color:"text.secondary",children:n("step1.noTypesAvailable","Aucun type de location n'est configuré. Contactez l'administrateur.")})}):e.jsxs(c,{sx:{py:{xs:2,md:4}},children:[e.jsx(a,{variant:"h5",component:"h2",fontWeight:"bold",textAlign:"center",sx:{mb:4,px:2},children:n("step1.title")}),e.jsx(d,{container:!0,spacing:3,justifyContent:"center",sx:{maxWidth:900,mx:"auto",px:i?2:0},children:b.map(t=>{const o=t.icon,r=m===t.key;return e.jsx(d,{item:!0,xs:12,sm:6,md:b.length>2?4:6,children:e.jsx(x,{sx:{height:"100%",minHeight:280,cursor:"pointer",border:"3px solid",borderColor:r?t.color:"transparent",transform:r?"scale(1.02)":"scale(1)",transition:"all 0.3s ease",boxShadow:r?8:2,"&:hover":{transform:"scale(1.03)",boxShadow:8,borderColor:t.color}},children:e.jsx(f,{onClick:()=>g(t.key),sx:{height:"100%",display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.jsxs(p,{sx:{textAlign:"center",py:5,px:3,flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[e.jsx(c,{sx:{width:110,height:110,borderRadius:"50%",backgroundColor:t.bgColor,display:"flex",alignItems:"center",justifyContent:"center",mb:3},children:e.jsx(o,{sx:{fontSize:56,color:t.color}})}),e.jsx(a,{variant:"h5",fontWeight:"800",sx:{mb:2,color:"#334155"},children:t.title}),e.jsx(a,{variant:"body1",color:"text.secondary",sx:{lineHeight:1.5,fontSize:"1.05rem"},children:t.description})]})})})},t.key)})})]})}export{v as default};
