pkg-components
Version:
16 lines (15 loc) • 4.35 kB
JavaScript
import{j as a,a as n,F as w}from"./jsx-runtime-DI8_P1Ft.js";import{P as r}from"./index-B3IC6ylx.js";import"./index-BApHpKep.js";import{A as _}from"./index-BTtkqCix.js";import{H as I}from"./index-54L18hga.js";import"./index-XORxt8qY.js";import{D as m}from"./index-Daagk5ZO.js";import{R as T}from"./index-D-dsD9vT.js";import{T as t}from"./index-Bww7KC1c.js";import{B as L}from"./index-DuIGVyw3.js";import{C as O}from"./index-CoXI7PFH.js";import{R as c}from"./index-OmEDsgBY.js";const o=({active:d=0,fState:i=0,idStore:l="",minOrder:s=!1,overActive:f=0,rating:v=0,show:y,steps:h=[],schedulesStore:g=[],setRatingStar:x=e=>e,handleClose:q=()=>{},setActive:V=e=>e,setRating:b=e=>e,handleOverActive:A=e=>e,removeFav:S=e=>e,addFav:R=e=>e})=>a(_,{handleClose:q,show:y,children:n("div",{style:{width:"90%",margin:"auto"},children:[a(I,{active:d,handleOverActive:A,overActive:f,setActive:V,steps:h}),d===0&&n(w,{children:[n("div",{style:{width:"50%"},children:[a(t,{margin:"0 0 20px 0",children:"Califica este restaurante"}),a("div",{style:{width:"min-content"},children:a(T,{onRating:e=>{b(e),x({variables:{data:{rScore:e}}})},rating:v,size:30})})]}),a(m,{borderTop:!0,margin:"20px 0"}),n("div",{className:"containe",style:{width:"50%",justifyContent:"end"},children:[!!s&&n(t,{margin:"0 0 20px 0",size:"15px",children:["Precio de Producto mínimo $ ",s]}),n(t,{margin:"0 0 20px 0",children:[i===1?"Elimina de":"Añade de "," tus favoritos"]}),a(L,{isLiked:i===1,onClick:()=>i===1?S(l,i):R(l),children:i===1?"Eliminar":"Añadir"})]})]}),d===1&&g.map((e,C)=>{var u;return n(O,{children:[n(c,{children:[a(t,{margin:"0 20px 20px 0",children:e.day}),(u=e==null?void 0:e.horarios)==null?void 0:u.map((p,F)=>a("div",{children:n(c,{children:[a(t,{margin:"0 0 10px 0",children:p.horaInicio||"Cerrado"}),a(t,{margin:"0 0 10px 0",children:" - "}),a(t,{margin:"0 0 10px 0",children:p.horaFin||"Cerrado"})]})},F))]}),a(m,{borderTop:!0,margin:"0 0 10px 0"})]},C)})]})});o.propTypes={active:r.number,addFav:r.func,fState:r.number,handleClose:r.func,setRating:r.func,setActive:r.func,handleOverActive:r.func,idStore:r.string,minOrder:r.bool,rating:r.number,overActive:r.number,removeFav:r.func,setRatingStar:r.func,show:r.bool,steps:r.array,schedulesStore:r.array};try{o.displayName="LateralStoreInfo",o.__docgenInfo={description:"",displayName:"LateralStoreInfo",props:{active:{defaultValue:{value:"0"},description:"",name:"active",required:!1,type:{name:"number"}},fState:{defaultValue:{value:"0"},description:"",name:"fState",required:!1,type:{name:"number"}},idStore:{defaultValue:{value:""},description:"",name:"idStore",required:!1,type:{name:"string"}},minOrder:{defaultValue:{value:"false"},description:"",name:"minOrder",required:!1,type:{name:"boolean"}},overActive:{defaultValue:{value:"0"},description:"",name:"overActive",required:!1,type:{name:"number"}},rating:{defaultValue:{value:"0"},description:"",name:"rating",required:!1,type:{name:"number"}},show:{defaultValue:null,description:"",name:"show",required:!0,type:{name:"any"}},steps:{defaultValue:{value:"[]"},description:"",name:"steps",required:!1,type:{name:"never[]"}},schedulesStore:{defaultValue:{value:"[]"},description:"",name:"schedulesStore",required:!1,type:{name:"never[]"}},setRatingStar:{defaultValue:{value:`(props) => {\r
return props\r
}`},description:"",name:"setRatingStar",required:!1,type:{name:"((props: any) => any)"}},handleClose:{defaultValue:{value:`() => {\r
return\r
}`},description:"",name:"handleClose",required:!1,type:{name:"(() => void)"}},setActive:{defaultValue:{value:`(active) => {\r
return active\r
}`},description:"",name:"setActive",required:!1,type:{name:"((active: any) => any)"}},setRating:{defaultValue:{value:`(active) => {\r
return active\r
}`},description:"",name:"setRating",required:!1,type:{name:"((active: any) => any)"}},handleOverActive:{defaultValue:{value:`(index) => {\r
return index\r
}`},description:"",name:"handleOverActive",required:!1,type:{name:"((index: any) => any)"}},removeFav:{defaultValue:{value:`(props) => {\r
return props\r
}`},description:"",name:"removeFav",required:!1,type:{name:"((props: any) => any)"}},addFav:{defaultValue:{value:`(props) => {\r
return props\r
}`},description:"",name:"addFav",required:!1,type:{name:"((props: any) => any)"}}}}}catch{}export{o as L};