1import{bm as j,r as i,G as e,aN as o,a7 as m,aO as r,ap as d,aT as x,aS as y}from"./vendor-BvYDHPOR.js";import{u as g}from"./useResponsive-D6oHVrOF.js";import"./index-CQWuR6TJ.js";import{i as R}from"./placeManagement.service-CY7DKy5d.js";import{b1 as T,ab as C,a$ as O,ad as u,aK as P,ae as S}from"./vendor-mui-icons-CrMwg7iZ.js";function W(){const{placeId:p}=j(),n=Number(p),{isMobile:f}=g(),[a,b]=i.useState(null),[v,s]=i.useState(!0),c=i.useCallback(async()=>{try{s(!0);const l=await R(n);b(l)}catch{}finally{s(!1)}},[n]);if(i.useEffect(()=>{c()},[c]),v)return e.jsx(o,{sx:{display:"flex",justifyContent:"center",py:6},children:e.jsx(m,{})});const t=[{label:"Items de Reserva",value:(a==null?void 0:a.totalItems)??0,icon:e.jsx(T,{}),color:"#4caf50"},{label:"Capacidad Total",value:(a==null?void 0:a.totalCapacity)??0,icon:e.jsx(C,{}),color:"#2196f3"},{label:"Reservas Totales",value:(a==null?void 0:a.totalReservations)??0,icon:e.jsx(O,{}),color:"#ff9800"},{label:"Tasa de Ocupacion",value:`${(a==null?void 0:a.occupancyRate)??0}%`,icon:e.jsx(u,{}),color:"#e91e63"},{label:"Clientes Atendidos",value:(a==null?void 0:a.clientsServed)??0,icon:e.jsx(P,{}),color:"#009688"},{label:"Duracion Promedio",value:(a==null?void 0:a.avgDuration)??"-",icon:e.jsx(S,{}),color:"#673ab7"}];return e.jsxs(o,{sx:{display:"flex",flexDirection:"column",gap:3},children:[e.jsxs(o,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(u,{color:"primary"}),e.jsx(r,{variant:"h6",fontWeight:"bold",children:"Estadisticas de Reservas"})]}),f?e.jsx(d,{sx:{borderRadius:3,overflow:"hidden"},elevation:0,children:t.map((l,h)=>e.jsxs(o,{sx:{display:"flex",alignItems:"center",gap:1.5,px:2,py:1.75,borderTop:h===0?"none":"1px solid",borderColor:"divider"},children:[e.jsx(o,{sx:{color:l.color,display:"flex"},children:l.icon}),e.jsx(r,{variant:"body2",color:"text.secondary",sx:{flex:1},children:l.label}),e.jsx(r,{variant:"h6",fontWeight:"bold",children:l.value})]},l.label))}):e.jsx(x,{container:!0,spacing:2,children:t.map(l=>e.jsx(x,{size:{xs:6,md:3},children:e.jsxs(d,{sx:{p:2.5,borderRadius:3,textAlign:"center"},elevation:0,children:[e.jsx(o,{sx:{color:l.color,mb:1},children:l.icon}),e.jsx(r,{variant:"h4",fontWeight:"bold",children:l.value}),e.jsx(r,{variant:"body2",color:"text.secondary",children:l.label})]})},l.label))}),(a==null?void 0:a.notice)&&e.jsx(y,{severity:"info",children:a.notice})]})}export{W as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.