PageSourceSearch

https://www.dineopen.com/_next/static/chunks/82846.8269fee2527baf20.js

js dineopen.com collected 2026-10-02 05:39:02 UTC 39,472 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6375,82846],{6375:(e,t,l)=>{l.r(t),l.d(t,{default:()=>s});var r=l(95155),n=l(12115),a=l(47650),o=l(70898),i=l(55490);function s(e){var t,l;let{isOpen:s,onClose:d,sourceTable:c,floors:u=[],restaurantId:f,onMoveComplete:p}=e,[x,m]=(0,n.useState)(null),[b,g]=(0,n.useState)(null),[h,v]=(0,n.useState)(!1),[y,j]=(0,n.useState)(null),N=(0,n.useMemo)(()=>u&&0!==u.length?u.map(e=>{var t;let l=(e.tables||[]).filter(e=>"available"===e.status&&e.id!==(null==c?void 0:c.id));return{id:e.id,name:e.name||(null==(t=e.info)?void 0:t.name)||"Floor",tables:l,totalTables:(e.tables||[]).length}}).filter(e=>e.tables.length>0||e.id===(null==c?void 0:c.floorId)):[],[u,c]),I=x||(null==c?void 0:c.floorId)||(null==(t=N.find(e=>e.tables.length>0))?void 0:t.id)||(null==(l=N[0])?void 0:l.id),k=N.find(e=>e.id===I),w=(null==k?void 0:k.tables)||[],S=N.length>1,C=async()=>{if(b&&(null==c?void 0:c.currentOrderId)&&!h){v(!0),j(null);try{let e=N.find(e=>e.id===I);await i.default.moveOrderToTable(c.currentOrderId,{targetTableId:b.id,targetTableName:b.name||b.number,targetFloorId:I||null,targetFloorName:(null==e?void 0:e.name)||null,restaurantId:f}),p&&p(c.id,b.id),d()}catch(e){console.error("Move order failed:",e),j(e.message||"Failed to move order. Please try again.")}finally{v(!1)}}};return s&&"undefined"!=typeof document?(0,a.createPortal)((0,r.jsx)("div",{onClick:d,style:{position:"fixed",inset:0,zIndex:99999,background:"rgba(0,0,0,0.4)",backdropFilter:"blur(2px)",display:"flex",alignItems:"center",justifyContent:"center",padding:"16px"},children:(0,r.jsxs)("div",{onClick:e=>e.stopPropagation(),style:{background:"#fff",borderRadius:"16px",width:"100%",maxWidth:"420px",maxHeight:"80vh",display:"flex",flexDirection:"column",boxShadow:"0 20px 60px rgba(0,0,0,0.2)",overflow:"hidden"},children:[(0,r.jsxs)("div",{style:{padding:"16px 20px",borderBottom:"1px solid #f3f4f6",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"10px"},children:[(0,r.jsx)("div",{style:{width:"32px",height:"32px",borderRadius:"8px",background:"#eff6ff",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,r.jsx)(o.yk7,{size:14,color:"#3b82f6"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{style:{fontSize:"14px",fontWeight:600,color:"#111827"},children:"Move Order"}),(0,r.jsxs)("div",{style:{fontSize:"12px",color:"#6b7280"},children:["Table ",null==c?void 0:c.name,(null==c?void 0:c.floorName)?" \xb7 ".concat(c.floorName):""]})]})]}),(0,r.jsx)("button",{onClick:d,style:{background:"none",border:"none",cursor:"pointer",padding:"6px",color:"#9ca3af",borderRadius:"6px"},children:(0,r.jsx)(o.QCr,{size:16})})]}),S&&(0,r.jsx)("div",{style:{padding:"12px 20px 0",display:"flex",gap:"6px",flexWrap:"wrap"},children:N.map(e=>{let t=e.id===I;return(0,r.jsxs)("button",{onClick:()=>{m(e.id),g(null),j(null)},style:{padding:"6px 12px",borderRadius:"20px",border:"none",fontSize:"12px",fontWeight:500,cursor:"pointer",background:t?"#111827":"#f3f4f6",color:t?"#fff":"#374151",transition:"all 0.15s"},children:[e.name," (",e.tables.length,")"]},e.id)})}),(0,r.jsx)("div",{style:{padding:"16px 20px",flex:1,overflowY:"auto",minHeight:"120px"},children:0===w.length?(0,r.jsxs)("div",{style:{textAlign:"center",padding:"32px 16px",color:"#9ca3af"},children:[(0,r.jsx)(o.n75,{size:24,style:{marginBottom:"8px",opacity:.4}}),(0,r.jsx)("div",{style:{fontSize:"13px"},children:"No available tables on this floor"})]}):(0,r.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(90px, 1fr))",gap:"8px"},children:w.map(e=>{let t=(null==b?void 0:b.id)===e.id;return(0,r.jsxs)("button",{onClick:()=>{g(e),j(null)},style:{padding:"12px 8px",borderRadius:"10px",border:t?"2px solid #3b82f6":"1px solid #e5e7eb",background:t?"#eff6ff":"#fff",cursor:"pointer",textAlign:"center",transition:"all 0.15s"},children:[(0,r.jsx)("div",{style:{fontSize:"14px",fontWeight:600,color:t?"#1d4ed8":"#111827"},children:e.name||e.number}),e.capacity&&(0,r.jsxs)("div",{style:{fontSize:"11px",color:"#9ca3af",marginTop:"2px"},children:[e.capacity," seats"]})]},e.id)})})}),y&&(0,r.jsx)("div",{style:{margin:"0 20px",padding:"8px 12px",borderRadius:"8px",background:"#fef2f2",color:"#dc2626",fontSize:"12px"},children:y}),(0,r.jsxs)("div",{style:{padding:"12px 20px",borderTop:"1px solid #f3f4f6",display:"flex",gap:"8px"},children:[(0,r.jsx)("button",{onClick:d,disabled:h,style:{flex:1,padding:"10px",borderRadius:"10px",border:"1px solid #e5e7eb",background:"#fff",color:"#374151",fontSize:"13px",fontWeight:600,cursor:h?"not-allowed":"pointer"},children:"Cancel"}),(0,r.jsx)("button",{onClick:C,disabled:!b||h,style:{flex:1,padding:"10px",borderRadius:"10px",border:"none",background:!b||h?"#d1d5db":"#3b82f6",color:"#fff",fontSize:"13px",fontWeight:600,cursor:!b||h?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"center",gap:"6px"},children:h?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.hW,{size:12,className:"spin"})," Moving..."]}):(0,r.jsxs)(r.Fragment,{children:["Move",b?" to ".concat(b.name||b.number):""]})})]})]})}),document.body):null}},82846:(e,t,l)=>{l.r(t),l.d(t,{default:()=>S});var r=l(95155),n=l(88661),a=l.n(n),o=l(12115),i=l(47650),s=l(20063),d=l(70898),c=l(55490),u=l(15793),f=l(49819),p=l(6810),x=l(64394),m=l(70109),b=l(71443),g=l(6375),h=l(21025),v=l(71213),y=l(62232),j=l(77655),N=l(75124),I=l(18782),k=l(95194),w=l(59614);function S(e){var t,l,n;let{floors:S=[],tables:C=[],isRefreshing:T=!1,onTakeOrder:O,onViewOrder:z,selectedRestaurant:R,onSliderClose:P,cart:W,setCart:B,orderType:E,setOrderType:L,paymentMethod:M,setPaymentMethod:A,onClearCart:D,onProcessOrder:F,onSaveOrder:_,onPlaceOrder:Q,onRemoveFromCart:H,onAddToCart:q,onUpdateCartItemQuantity:G,onTableNumberChange:K,onCustomerNameChange:U,onCustomerMobileChange:V,processing:Z,placingOrder:J,orderSuccess:X,setOrderSuccess:Y,error:$,getTotalAmount:ee,tableNumber:et,customerName:el,customerMobile:er,orderLookup:en,setOrderLookup:ea,currentOrder:eo,setCurrentOrder:ei,onShowQRCode:es,restaurantName:ed,taxSett
1ings:ec,menuItems:eu,printSettings:ef,onRefreshTables:ep,onOptimisticTableUpdate:ex,recentlyUpdatedTableId:em,onClearRecentlyUpdated:eb,upiSettings:eg={},whatsappConnected:eh=!1,billingSettings:ev={},multiPricingEnabled:ey=!1,pricingRules:ej=[],activePricingRuleId:eN=null,setActivePricingRuleId:eI,countryCode:ek="IN",businessType:ew="restaurant",canDeleteTable:eS=!1,onDeleteTable:eC,posSettings:eT={}}=e,eO=(0,s.useRouter)(),{formatCurrency:ez,getCurrencySymbol:eR}=(0,v.H2)(),eP=!!window.__DINEOPEN_MOBILE_EMBED__,[eW,eB]=(0,o.useState)(!1),[eE,eL]=(0,o.useState)(!1),eM=(null==eT?void 0:eT.seatOrdering)==="chair",[eA,eD]=(0,o.useState)({});(0,o.useEffect)(()=>{if(!eM||!(null==R?void 0:R.id))return void eD({});let e=!1;return(async()=>{try{let t=await c.default.getOpenOrders(R.id);if(e)return;let l={};((null==t?void 0:t.openOrders)||[]).forEach(e=>{var t;let r=String(null!=(t=null==e?void 0:e.tableNumber)?t:"").trim();r&&(l[r.toLowerCase()]=l[r.toLowerCase()]||[]).push(e)}),eD(l)}catch(t){e||eD({})}})(),()=>{e=!0}},[eM,null==R?void 0:R.id,em]);let[eF,e_]=(0,o.useState)(null),[eQ,eH]=(0,o.useState)(!1),[eq,eG]=(0,o.useState)(null),[eK,eU]=(0,o.useState)({open:!1,table:null}),[,eV]=(0,o.useState)(0),[eZ,eJ]=(0,o.useState)(!1),[eX,eY]=(0,o.useState)(null),[e$,e0]=(0,o.useState)({}),{printBill:e7,KraPrompt:e1}=(0,I.K)(),[e5,e2]=(0,o.useState)(null),[e6,e4]=(0,o.useState)(null),[e8,e3]=(0,o.useState)(null),[e9,te]=(0,o.useState)(null),[tt,tl]=(0,o.useState)(null),[tr,tn]=(0,o.useState)(null),[ta,to]=(0,o.useState)(null),[ti,ts]=(0,o.useState)("grid"),[td,tc]=(0,o.useState)(()=>localStorage.getItem("tableGridCols")||"3"),tu=(0,o.useRef)(null),tf=(0,o.useRef)([]);(0,o.useEffect)(()=>{let e=setInterval(()=>eV(e=>e+1),6e4);return()=>{clearInterval(e),tf.current.forEach(e=>clearTimeout(e)),tf.current=[]}},[]),(0,o.useEffect)(()=>{if(!e5)return;let e=()=>e2(null);return document.addEventListener("click",e),()=>document.removeEventListener("click",e)},[e5]),(0,o.useEffect)(()=>{if(em){tu.current&&tu.current.scrollIntoView({behavior:"smooth",block:"center"});let e=setTimeout(()=>{eb&&eb()},800);return()=>clearTimeout(e)}},[em,eb]);let tp=e=>{let t=e=>null!=e&&Number.isFinite(Number(e))?Number(e):null;return[...e].sort((e,l)=>{let r=t(e.order),n=t(l.order);if(null!=r&&null!=n&&r!==n)return r-n;if(null!=r&&null==n)return -1;if(null==r&&null!=n)return 1;let a=(e.name||e.number||"").toString().trim(),o=(l.name||l.number||"").toString().trim(),i=Number(a),s=Number(o),d=""!==a&&!isNaN(i),c=""!==o&&!isNaN(s);return d||c?!d&&c?-1:d&&!c?1:i-s:a.localeCompare(o,void 0,{numeric:!0,sensitivity:"base"})})},tx=(0,o.useMemo)(()=>{let e=[];
1if(Array.isArray(S)&&S.length>0&&S.some(e=>Array.isArray(e.tables)))e=S.map(e=>({info:{id:e.id,name:e.name||e.floorName||"Floor"},tables:tp(e.tables||[])}));else{let t={};S.forEach(e=>{t[e.id||e.name||"default"]={info:{name:e.name||"Floor"},tables:[]}}),(C||[]).forEach(e=>{let l=e.floorId||e.floor||e.floorName||"default";t[l]||(t[l]={info:{name:e.floorName||e.floor||"Floor"},tables:[]}),t[l].tables.push(e)}),e=Object.values(t).map(e=>({...e,tables:tp(e.tables)}))}return e.filter(e=>e.tables&&e.tables.length>0)},[S,C]),tm=(e,t,l)=>{var r;if("out-of-service"===(null==(r=e.status)?void 0:r.toLowerCase()))return void eU({open:!0,table:e,floorName:t,floorId:l});eW&&tg(),O&&O(e.name||e.number,{id:e.id,floor:t,floorId:l||null,capacity:e.capacity})},tb=async(e,t)=>{if(e.stopPropagation(),t.currentOrderId&&!e9){te(t.id);try{var l;let e=await c.default.getOrderById(t.currentOrderId),r=(null==(l=e.orders)?void 0:l[0])||e.order||e;e3({...r,tableName:t.name||t.number})}catch(e){console.error("Quick view failed:",e)}finally{te(null)}}},tg=()=>{eB(!1),eL(!1),e_(null),eG(null),P&&P()},th=()=>{eL(!1)},tv=e=>{e.currentOrderId&&(null==R?void 0:R.id)&&(eY(e),eJ(!0))},ty=async function(e){let{preBill:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e2(null),!e.currentOrderId||!(null==R?void 0:R.id))return;let l=e.id||e.currentOrderId;e0(e=>({...e,[l]:!0}));try{let r=await c.default.getOrderById(e.currentOrderId);if(!r.orders||0===r.orders.length)return void e0(e=>({...e,[l]:!1}));let n=r.orders[0],a=(e=>{var t,l,r;let n=eR(),a=e.items||[],o=e.totalAmount||e.subtotal||a.reduce((e,t)=>e+(t.price||0)*(t.quantity||1),0);return{...e,currencySymbol:n,subtotal:o,grandTotal:e.finalAmount||e.grandTotal||o,restaurantName:ed||"Restaurant",restaurantLegalName:null==R?void 0:R.legalBusinessName,restaurantAddress:(null==ef?void 0:ef.receiptAddress)||(null==R?void 0:R.address),restaurantPhone:(null==ef?void 0:ef.receiptPhone)||(null==R?void 0:R.phone),gstin:null==R?void 0:R.gstin,fssai:null==R?void 0:R.fssai,vatNumber:null==R?void 0:R.vatNumber,taxId:null==R?void 0:R.taxId,businessRegistrationNumber:null==R?void 0:R.businessRegistrationNumber,showGstOnInvoice:null==R?void 0:R.showGstOnInvoice,showFssaiOnInvoice:null==R?void 0:R.showFssaiOnInvoice,showTaxIdOnInvoice:null==R?void 0:R.showTaxIdOnInvoice,countryCode:(null==R?void 0:R.countryCode)||ek,taxLabel:(null==R||null==(t=R.currencySettings)?void 0:t.taxLabel)||"",customerName:(null==(l=e.customerDisplay)?void 0:l.name)||(null==(r=e.customerInfo)?void 0:r.name)||e.customerName,customerTin:e.customerTin||null}})(n);t&&(a.isPreBill=!0);let o=(0,j.generateBillHTML)(a,ef||{}),i=async()=>{(0,N.QZ)()?await (0,N.dq)({html:o,type:"bill",printSettings:ef||{}}):tk(o)};t?await i():await e7({restaurantId:R.id,order:n,restaurant:R,printSettings:ef,plainPrint:i}),tI(n)}catch(e){console.error("Error printing bill:",e)}finally{tf.current.push(setTimeout(()=>e0(e=>({...e,[l]:!1})),1e3))}},tj=e=>ty(e,{preBill:!0}),tN=async e=>{if(e2(null),!e.currentOrderId||!(null==R?void 0:R.id))return;let t=e.id||e.currentOrderId;e0(e=>({...e,[t]:!0}));try{var l,r;let n=await c.default.getOrderById(e.currentOrderId);if(!n.orders||0===n.orders.length)return void e0(e=>({...e,[t]:!1}));let a=n.orders[0],o=await (0,k.g)({restaurantId:R.id,orderId:a.id,order:a,restaurantName:ed||(null==R?void 0:R.name)||"",categories:(null==R?void 0:R.categories)||[],printSettings:ef||{},posSettings:eT,t:h.t,currencySymbol:eR()});if(null==o?void 0:o.handled)return void tf.current.push(setTimeout(()=>e0(e=>({...e,[t]:!1})),1e3));let i=ef||{},s=a.items||[];if(i.kotExclusionEnabled){let e=new Set(i.kotExcludedCategories||[]),t=new Set(i.kotExcludedItemIds||[]);(e.size>0||t.size>0)&&(s=s.filter(l=>!(t.has(l.id||l.menuItemId)||e.has(l.categoryId))))}if(0===s.length)return void e0(e=>({...e,[t]:!1}));let d={...a,items:s,restaurantName:ed||"Restaurant",orderId:a.id,customerName:(null==(l=a.customerDisplay)?void 0:l.name)||(null==(r=a.customerInfo)?void 0:r.name)||a.customerName,customerTin:a.customerTin||null,covers:a.covers||1},u=(0,j.generateKOTHTML)(d,ef||{});if((0,N.QZ)())await (0,N.dq)({html:u,type:"kot",printSettings:ef||{}});else{let e=window.open("","_blank","width=400,height=600");e&&(e.document.write(u),e.document.close(),e.focus(),setTimeout(()=>e.print(),400))}}catch(e){console.error("Error printing KOT:",e)}finally{tf.current.push(setTimeout(()=>e0(e=>({...e,[t]:!1})),1e3))}},tI=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1200;if((null==ef?void 0:ef.tokenBillingEnabled)&&(null==R?void 0:R.id)&&(null==e?void 0:e.id))try{let l=await c.default.getTokenRender(R.id,e.id),r=(null==l?void 0:l.tokens)||[];
1if(!(null==l?void 0:l.success)||0===r.length)return;let n=(0,N.QZ)(),a=e=>new Promise(t=>setTimeout(t,e));if(n)for(let e of(t>0&&await a(t),r)){let t=(0,y.HW)(e,ef);await (0,N.dq)({html:t,type:"bill",printSettings:ef||{}}),await a(350)}else{let e=(0,y.ZB)(r,ef);setTimeout(()=>{(0,N.L8)(e).catch(e=>{console.error("Food court token print failed:",e)})},t)}}catch(e){console.error("Food court token print error:",e)}},tk=e=>{let t=window.open("","_blank","width=800,height=600");if(!t)return void alert("Please allow popups to print");t.document.write(e),t.document.close(),t.focus(),setTimeout(()=>t.print(),500)},tw=e=>{if("merged"===e)return{color:"#0ea5e9",bg:"#f0f9ff",text:"#075985",label:"Merged",icon:d.aQJ,border:"#7dd3fc"};let t=(e=>{switch(null==e?void 0:e.toLowerCase()){case"occupied":return{color:"#f59e0b",bg:"#fffbeb",border:"#fcd34d",label:"Occupied",icon:d.M5n};case"reserved":return{color:"#3b82f6",bg:"#eff6ff",border:"#3b82f6",label:"Reserved",icon:d.w_X};case"cleaning":return{color:"#6b7280",bg:"#f3f4f6",border:"#9ca3af",label:"Cleaning",icon:d.xdT};case"out-of-service":return{color:"#ef4444",bg:"#fef2f2",border:"#ef4444",label:"Out of Service",icon:d.Rqy};case"serving":return{color:"#8b5cf6",bg:"#f5f3ff",border:"#8b5cf6",label:"Serving",icon:d.xBk};default:return{color:"#10b981",bg:"#f0fdf4",border:"#10b981",label:"Available",icon:d.n75}}})(e);return{...t,text:t.color}},tS=e=>{if(!(null==e?void 0:e.lastOrderTime))return null;let t=e.lastOrderTime,l=(null==t?void 0:t.toDate)?t.toDate():new Date((null==t?void 0:t._seconds)?1e3*t._seconds:t);if(isNaN(l.getTime()))return null;let r=Math.floor((Date.now()-l.getTime())/6e4);if(r<1)return"just now";if(r<60)return"".concat(r,"m");let n=Math.floor(r/60);if(n<24)return"".concat(n,"h ").concat(r%60,"m");let a=Math.floor(n/24);return"".concat(a,"d ").concat(n%24,"h")},tC=e=>{if(!(null==e?void 0:e.lastOrderTime))return 0;let t=e.lastOrderTime,l=(null==t?void 0:t.toDate)?t.toDate():new Date((null==t?void 0:t._seconds)?1e3*t._seconds:t);return isNaN(l.getTime())?0:(Date.now()-l.getTime())/36e5};return(0,r.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:eP?"12px":"24px",padding:eP?"0 10px 20px":"0 24px 40px",maxWidth:"100%",boxSizing:"border-box"},className:"jsx-74eec6f755072ede",children:[(0,r.jsx)(a(),{id:"74eec6f755072ede",children:"@keyframes slideInRight{from{transform:translatex(100%)}to{transform:translatex(0)}}@keyframes slideUpBottom{from{transform:translatey(100%)}to{transform:translatey(0)}}@keyframes dash{to{stroke-dashoffset:0}}@keyframes modalFadeIn{from{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes pulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.7;transform:scale(1.1)}}@keyframes tableSpinRing{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes tablePulseOverlay{0%,100%{opacity:.55}50%{opacity:.35}}.table-card.jsx-74eec6f755072ede{transition:transform.2s ease,box-shadow.2s ease}.table-card.jsx-74eec6f755072ede:hover{transform:translatey(-2px);box-shadow:0 8px 16px -4px rgba(0,0,0,.1)}.btn-action.jsx-74eec6f755072ede{transition:all.2s}.btn-action.jsx-74eec6f755072ede:active{transform:scale(.98)}@media(max-width:620px){.table-actions-modal.jsx-74eec6f755072ede{max-width:100%!important;border-radius:16px 16px 0 0!important;position:fixed!important;bottom:0!important;left:0!important;right:0!important;max-height:92vh!important}}"}),tx.length>0&&(0,r.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:"10px"},className:"jsx-74eec6f755072ede",children:(0,r.jsx)("div",{style:{display:"flex",gap:"2px",backgroundColor:"#f1f5f9",borderRadius:"10px",padding:"3px"},className:"jsx-74eec6f755072ede",children:[{k:"grid",I:d.QJV,label:"Grid"},{k:"floorplan",I:d.x7F,label:"Floor Map"}].map(e=>(0,r.jsxs)("button",{onClick:()=>ts(e.k),title:"".concat(e.label," view"),style:{padding:"6px 12px",borderRadius:"8px",border:"none",fontSize:"12px",fontWeight:600,cursor:"pointer",display:"flex",alignItems:"center",gap:"5px",whiteSpace:"nowrap",backgroundColor:ti===e.k?"white":"transparent",color:ti===e.k?"#1f2937":"#9ca3af",boxShadow:ti===e.k?"0 1px 3px rgba(0,0,0,0.08)":"none"},className:"jsx-74eec6f755072ede",children:[(0,r.jsx)(e.I,{size:11})," ",e.label]},e.k))})}),tx.map((e,t)=>{var l,n,a,o;return(0,r.jsxs)("div",{style:{background:"transparent"},className:"jsx-74eec6f755072ede",children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:eP?"8px":"16px",borderBottom:"1px solid #e5e7eb",paddingBottom:eP?"4px":"8px"},className:"jsx-74eec6f755072ede",children:[(0,r.jsxs)("div",{style:{fontSize:eP?"13px":"16px",fontWeight:700,color:"#1f2937",display:"flex",alignItems:"center",gap:"10px"},className:"jsx-74eec6f755072ede",children:[(0,r.jsx)("span",{style:{width:"4px",height:"20px",background:"#3b82f6",borderRadius:"2px",display:"inline-block"},className:"jsx-74eec6f755072ede"}),(null==(l=e.info)?void 0:l.name)||"Floor ".concat(t+1),(0,r.jsxs)("span",{style:{fontSize:"11px",fontWeight:600,color:"#6b7280",marginLeft:"8px",background:"#f3f4f6",padding:"2px 8px",borderRadius:"12px",border:"1px solid #e5e7eb"},className:"jsx-74eec6f755072ede",children:[(null==(n=e.tables)?void 0:n.length)||0," Tables"]})]}),eP&&(0,r.jsxs)("div",{style:{display:"flex",gap:"2px",marginLeft:"auto"},className:"jsx-74eec6f755072ede",children:[(0,r.jsx)("button",{onClick:()=>{tc("2"),localStorage.setItem("tableGridCols","2")},style:{padding:"3px 6px",border:"none",borderRadius:"4px",cursor:"pointer",background:"2"===td?"#3b82f6":"#f3f4f6",color:"2"===td?"#fff":"#6b7280"},title:"2 columns",className:"jsx-74eec6f755072ede",children:(0,r.jsx)(d.x7F,{size:12})}),(0,r.jsx)("button",{onClick:()=>{tc("3"),localStorage.setItem("tableGridCols","3")},style:{padding:"3px 6px",border:"none",borderRadius:"4px",cursor:"pointer",background:"3"===td?"#3b82f6":"#f3f4f6",color:"3"===td?"#fff":"#6b7280"},title:"3 columns",className:"jsx-74eec6f755072ede",children:(0,r.jsx)(d.QJV,{size:12})})]})]}),"floorplan"===ti?(0,r.jsx)(x.A,{floor:{id:null==(a=e.info)?void 0:a.id,name:null==(o=e.info)?void 0:o.name,tables:e.tables||[]},editable:!1,statusInfo:tw,formatCurrency:ez,onTableClick:t=>{if(t.currentOrderId)eW&&tg(),eO.push("/dashboard?orderId=".concat(t.currentOrderId,"&mode=edit&from=tables"));else{var l,r;tm(t,null==(l=e.info)?void 0:l.name,null==(r=e.info)?void 0:r.id)}}}):(0,r.jsxs)("div",{style:{display:"grid",gridTemplateColumns:eP?"repeat(".concat(td,", 1fr)"):"repeat(auto-fill, minmax(160px, 1fr))",gap:eP?"8px":"20px"},className:"jsx-74eec6f755072ede",children:[(e.tables||[]).map((t,l)=>{if(t.isSubTable||t.isPartyTable)return null;if(t.isSplit){let n=(e.tables||[]).filter(e=>e.isSubTable&&e.parentTableId===t.id).sort((e,t)=>
1(e.subLabel||"").localeCompare(t.subLabel||""));return(0,r.jsxs)("div",{style:{border:"1px solid #e5e7eb",background:"#fff",borderRadius:"12px",overflow:"hidden",display:"flex",flexDirection:"column",boxShadow:"0 1px 3px rgba(0,0,0,0.05)",minWidth:0},className:"jsx-74eec6f755072ede",children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"5px",padding:"8px 10px",borderBottom:"1px solid #f1f5f9"},className:"jsx-74eec6f755072ede",children:[(0,r.jsx)("span",{style:{fontWeight:800,color:"#111827",fontSize:"14px"},className:"jsx-74eec6f755072ede",children:t.name}),(0,r.jsxs)("span",{style:{fontSize:"9px",fontWeight:700,color:"#7c3aed",background:"#f3e8ff",padding:"1px 6px",borderRadius:"999px"},className:"jsx-74eec6f755072ede",children:[(0,h.t)("tables.split")||"Split"," \xb7 ",n.length]})]}),(0,r.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"6px",padding:"8px",flex:1},className:"jsx-74eec6f755072ede",children:n.map(t=>{let l=t.status||"available",n=tw(l),a="available"!==l;return(0,r.jsxs)("button",{onClick:()=>(t=>{if("available"!==(t.status||"available")&&t.currentOrderId)eW&&tg(),eO.push("/dashboard?orderId=".concat(t.currentOrderId,"&mode=edit&from=tables"));else{var l,r;tm(t,null==(l=e.info)?void 0:l.name,null==(r=e.info)?void 0:r.id)}})(t),title:"".concat(t.name," \xb7 ").concat(n.label),style:{cursor:"pointer",borderRadius:"9px",border:"1.5px solid ".concat(a?n.color:n.border),background:a?n.color:n.bg,color:a?"#fff":n.text,minHeight:"42px",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:800,fontSize:"15px",transition:"all 0.12s"},className:"jsx-74eec6f755072ede",children:[t.subLabel||t.name,(0,r.jsx)("span",{style:{position:"absolute",top:"5px",right:"6px",width:"6px",height:"6px",borderRadius:"50%",background:a?"#fff":n.color},className:"jsx-74eec6f755072ede"})]},t.id)})})]},t.id||l)}if(eM){let n=eA[String(t.name||"").trim().toLowerCase()]||[];if(n.filter(e=>(null==e?void 0:e.chairNumber)!=null&&""!==String(e.chairNumber).trim()).length>=2)return(0,r.jsx)(p.A,{table:t,orders:n,formatCurrency:ez,onOpenOrder:e=>{e.currentOrderId&&(eW&&tg(),eO.push("/dashboard?orderId=".concat(e.currentOrderId,"&mode=edit&from=tables")))},onBill:t=>{var l,r;t.currentOrderId&&tv({...t,floor:null==(l=e.info)?void 0:l.name,floorId:null==(r=e.info)?void 0:r.id})},onPrintBill:e=>ty(e),onPrintPreBill:e=>tj(e),onPrintKOT:e=>tN(e),onQuickView:(e,t)=>tb(e,t),onNewChair:t=>{var l,r;return tm(t,null==(l=e.info)?void 0:l.name,null==(r=e.info)?void 0:r.id)}},t.id||l)}let n=em&&t.id===em;return(0,r.jsx)("div",{ref:n?tu:void 0,style:{minWidth:0},className:"jsx-74eec6f755072ede",children:(0,r.jsx)(f.A,{table:t,isToday:!0,isMobile:eP,isMobileEmbed:eP,posSettings:eT,tblBookings:[],tableStatus:t.status,canEditTableConfig:!1,canEditTable:!1,waitersCount:0,showManagementDropdown:!1,highlighted:n,activeDropdown:tt,setActiveDropdown:tl,hoveredTableId:tr,setHoveredTableId:tn,printDropdownTable:e5,setPrintDropdownTable:e2,printingTables:e$,quickViewLoading:e9,getTableStatusInfo:tw,getElapsed:tS,getElapsedHours:tC,formatCurrency:ez,t:h.t,onTableAction:(t,l)=>{var r,n,a,o,i,s;"take-order"===t?tm(l,null==(r=e.info)?void 0:r.name,null==(n=e.info)?void 0:n.id):"view-order"===t?(eW&&tg(),l.currentOrderId?eO.push("/dashboard?orderId=".concat(l.currentOrderId,"&mode=edit&from=tables")):tm(l,null==(a=e.info)?void 0:a.name,null==(o=e.info)?void 0:o.id)):"make-available"===t&&tm(l,null==(i=e.info)?void 0:i.name,null==(s=e.info)?void 0:s.id)},onOpenBilling:t=>{var l,r;t.currentOrderId&&tv({...t,floor:null==(l=e.info)?void 0:l.name,floorId:null==(r=e.info)?void 0:r.id})},onQuickView:tb,onPrintBill:ty,onPrintPreBill:tj,onPrintKOT:tN,onMoveOrder:t=>{var l,r;return e4({...t,floorId:null==(l=e.info)?void 0:l.id,floorName:(null==(r=e.info)?void 0:r.name)||e.name})},onEditTable:()=>{},onDeleteTable:e=>{eC&&eC(e.id)},onAssignServer:()=>{},onUnmerge:()=>{},onBookTable:()=>{},parties:(e.tables||[]).filter(e=>e.isPartyTable&&e.partyOfTableId===t.id).sort((e,t)=>(e.partyLabel||"").localeCompare(t.partyLabel||"")),onAddParty:async t=>{try{var l,r;let n=await c.default.addTableParty(R.id,t.id);ep&&await ep();let a=(null==n?void 0:n.party)||(null==n?void 0:n.table);(null==a?void 0:a.id)&&tm(a,null==(l=e.info)?void 0:l.name,null==(r=e.info)?void 0:r.id)}catch(e){console.error("Add party failed:",null==e?void 0:e.message)}},onOpenParty:t=>{if(null==t?void 0:t.currentOrderId)eW&&tg(),eO.push("/dashboard?orderId=".concat(t.currentOrderId,"&mode=edit&from=tables"));else{var l,r;tm(t,null==(l=e.info)?void 0:l.name,null==(r=e.info)?void 0:r.id)}},onOpenChecks:t=>to({table:t,floorInfo:e.info})})},t.id||l)}),(!e.tables||0===e.tables.length)&&(0,r.jsx)("div",{style:{fontSize:"14px",color:"#9ca3af",fontStyle:"italic"},className:"jsx-74eec6f755072ede",children:"No tables on this floor."})]})]},t)}),0===tx.length&&(0,r.jsxs)("div",{style:{textAlign:"center",color:"#9ca3af",padding:"40px",background:"#f9fafb",borderRadius:"12px"},className:"jsx-74eec6f755072ede",children:[(0,r.jsx)(d.n75,{size:48,style:{opacity:.2,marginBottom:"16
1px"}}),(0,r.jsx)("div",{className:"jsx-74eec6f755072ede",children:"No floors or tables found."})]}),eK.open&&(0,r.jsx)("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.35)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10002},className:"jsx-74eec6f755072ede",children:(0,r.jsxs)("div",{style:{background:"#fff",borderRadius:"12px",padding:"20px",width:"90%",maxWidth:"420px",boxShadow:"0 10px 30px rgba(0,0,0,0.15)",display:"flex",flexDirection:"column",gap:"12px"},className:"jsx-74eec6f755072ede",children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"10px"},className:"jsx-74eec6f755072ede",children:[(0,r.jsx)(d.Rqy,{size:18,color:"#ef4444"}),(0,r.jsxs)("div",{className:"jsx-74eec6f755072ede",children:[(0,r.jsx)("div",{style:{fontSize:"16px",fontWeight:700,color:"#111827"},className:"jsx-74eec6f755072ede",children:"Table Out of Service"}),(0,r.jsxs)("div",{style:{fontSize:"13px",color:"#4b5563"},className:"jsx-74eec6f755072ede",children:["Table ",(null==(t=eK.table)?void 0:t.name)||(null==(l=eK.table)?void 0:l.number)," is marked as out of service. Proceed anyway?"]})]})]}),(0,r.jsxs)("div",{style:{display:"flex",gap:"8px",marginTop:"4px"},className:"jsx-74eec6f755072ede",children:[(0,r.jsx)("button",{onClick:()=>eU({open:!1,table:null}),style:{flex:1,padding:"10px 12px",borderRadius:"8px",border:"1px solid #e5e7eb",background:"#fff",color:"#374151",fontWeight:600,cursor:"pointer"},onMouseEnter:e=>e.currentTarget.style.background="#f9fafb",onMouseLeave:e=>e.currentTarget.style.background="#fff",className:"jsx-74eec6f755072ede",children:"Cancel"}),(0,r.jsx)("button",{onClick:()=>{let e=eK.table,t=eK.floorName,l=eK.floorId;eU({open:!1,table:null,floorName:null,floorId:null}),e&&tm({...e,status:"available"},t,l)},style:{flex:1,padding:"10px 12px",borderRadius:"8px",border:"none",background:"#ef4444",color:"#fff",fontWeight:700,cursor:"pointer"},onMouseEnter:e=>e.currentTarget.style.background="#dc2626",onMouseLeave:e=>e.currentTarget.style.background="#ef4444",className:"jsx-74eec6f755072ede",children:"Proceed"})]})]})}),(0,r.jsx)(m.default,{open:eZ,table:eX,onClose:()=>{eJ(!1),eY(null)},selectedRestaurant:R,restaurantName:ed,taxSettings:ec,menuItems:eu,printSettings:ef,billingSettings:ev,multiPricingEnabled:ey,pricingRules:ej,activePricingRuleId:eN,setActivePricingRuleId:eI,countryCode:ek,businessType:ew,upiSettings:eg,whatsappConnected:eh,onRefreshTables:ep,onOptimisticTableUpdate:ex}),(null==ta?void 0:ta.table)&&(()=>{let e=ta.table,t=ta.floorInfo,l=S.flatMap(e=>e.tables||[]).filter(t=>t.isPartyTable&&t.partyOfTableId===e.id).sort((e,t)=>(e.partyLabel||"").localeCompare(t.partyLabel||""));return(0,r.jsx)(b.A,{table:e,parties:l,currencySymbol:(null==R?void 0:R.currencySymbol)||"₹",nextPartyLabel:String.fromCharCode(66+l.length),onClose:()=>to(null),onOpen:e=>{to(null),(null==e?void 0:e.currentOrderId)?(eW&&tg(),eO.push("/dashboard?orderId=".concat(e.currentOrderId,"&mode=edit&from=tables"))):tm(e,null==t?void 0:t.name,null==t?void 0:t.id)},onKOT:e=>tN(e),onBill:e=>{to(null),tv(e)},onAddParty:async e=>{to(null);try{let l=await c.default.addTableParty(R.id,e.id);ep&&await ep();let r=(null==l?void 0:l.party)||(null==l?void 0:l.table);(null==r?void 0:r.id)&&tm(r,null==t?void 0:t.name,null==t?void 0:t.id)}catch(e){console.error("Add party failed:",null==e?void 0:e.message)}},onPrintAllKOT:()=>{[e,...l].forEach(e=>{e.currentOrderId&&tN(e)})}})})(),e6&&(0,r.jsx)(g.default,{isOpen:!!e6,onClose:()=>e4(null),sourceTable:e6,floors:S,restaurantId:null==R?void 0:R.id,onMoveComplete:(e,t)=>{ex&&(ex(e,"available"),ex(t,"occupied")),ep&&setTimeout(ep,500),e4(null)}}),eW&&(0,r.jsxs)("div",{style:{position:"fixed",top:eE?"auto":0,bottom:eE?0:"auto",right:0,width:eE?"300px":"600px",maxWidth:"90vw",height:eE?"60px":"100vh",background:"#ffffff",boxShadow:"-4px 0 20px rgba(0, 0, 0, 0.15)",zIndex:10002,display:"flex",flexDirection:"column",animation:eE?"slideUpBottom 0.3s ease":"slideInRight 0.3s ease",overflow:"hidden",borderRadius:eE?"12px 12px 0 0":"0",cursor:"default"},className:"jsx-74eec6f755072ede",children:[(0,r.jsxs)("div",{style:{padding:eE?"8px 12px":"16px 24px",borderBottom:eE?"none":"1px solid #e5e7eb",display:"flex",alignItems:"center",justifyContent:"space-between",background:"#ffffff",flexShrink:0,height:eE?"100%":"auto",minHeight:eE?"60px":"auto"},onClick:e=>{e.stopPropagation(),eE&&th()},className:"jsx-74eec6f755072ede",children:[(0,r.jsxs)("div",{style:{flex:1},className:"jsx-74eec6f755072ede",children:[(0,r.jsx)("h3",{style:{margin:0,fontSize:eE?"14px":"18px",fontWeight:700,color:"#111827",lineHeight:"1.2"},className:"jsx-74eec6f755072ede",children:"Order Details"}),eF&&!eE&&(0,r.jsxs)("div",{style:{display:"flex",gap:"8px",marginTop:"4px"},className:"jsx-74eec6f755072ede",children:[(0,r.jsxs)("span",{style:{fontSize:"12px",color:"#6b7280",background:"#f3f4f6",padding:"2px 8px",borderRadius:"4px"},className:"jsx-74eec6f755072ede",children:["#",eF.orderNumber||eF.id]}),(0,r.jsx)("span",{style:{fontSize:"12px",color:"#6b7280",background:"#f3f4f6",padding:"2px 8px",borderRadius:"4px"},className:"jsx-74eec6f755072ede",children:eF.tableNumber?"Table ".concat(eF.tableNumber).concat(eF.chairNumber?" \xb7 Seat ".concat(eF.chairNumber):""):"No Table"})]}),eF&&eE&&(0,r.jsxs)("p",{style:{margin:"2px 0 0 0",fontSize:"11px",color:"#6b7280",lineHeight:"1.2"},className:"jsx-74eec6f755072ede",children:["#",eF.orderNumber||eF.id," • ",(null==W?void 0:W.length)||0," items • ",ez(ee?ee():0)]})]}),(0,r.jsxs)("div",{style:{display:"flex",gap:"8px",alignItems:"center"},className:"jsx-74eec6f755072ede",children:[eE?(0,r.jsx)("button",{onClick:e=>{e.stopPropagation(),th()},title:"Maximize",className:"jsx-74eec6f755072ede p-2 hover:bg-gray-100 rounded-full text-gray-500 transition-colors",children:(0,r.jsx)(d.U_c,{size:14})}):(0,r.jsx)("button",{onClick:e=>{e.stopPropagation(),eL(!0)},title:"Minimize",className:"jsx-74eec6f755072ede p-2 hover:bg-gray-100 rounded-full text-gray-500 transition-colors",children:(0,r.jsx)(d.iu5,{size:14})}),(0,r.jsx)("button",{onClick:e=>{e.stopPropagation(),tg()},title:"Close",className:"jsx-74eec6f755072ede p-2 hover:bg-red-50 text-gray-500 hover:text-red-500 rounded-full transition-colors",children:(0,r.jsx)(d.QCr,{size:16})})]})]}),!eE&&(0,r.jsx)("div",{style:{flex:1,overflow:"hidden",display:"flex",flexDirection:"column",background:"#f9fafb"},onClick:e=>e.stopPropagation(),className:"jsx-74eec6f755072ede",children:eQ?(0,r.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",color:"#6b7280",gap:"12px"},className:"jsx-74eec6f755072ede",children:[(0,r.jsx)("div",{className:"jsx-74eec6f755072ede animate-spin w-8 h-8 border-2 border-gray-300 border-t-blue-600 rounded-full"}),(0,r.jsx)("div",{style:{fontSize:"14px",fontWeight:500},className:"jsx-74eec6f755072ede",children:"Loading order details..."})]}):eq?(0,r.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",color:"#ef4444",gap:"12px"},className:"jsx-74eec6f755072ede",children:[(0,r.jsx)(d.QCr,{size:32,style:{opacity:.5}}),(0,r.jsx)("div",{style:{fontSize:"14px",fontWeight:500},className:"jsx-74eec6f755072ede",children:eq})]}):eF?(0,r.jsx)(u.default,{restaurant:R,cart:W,setCart:B,orderType:E,setOrderType:L,paymentMethod:M,setPaymentMethod:A,onClearCart:D,onProcessOrder:F,onSaveOrder:_,onPlaceOrder:Q,onRemoveFromCart:H,onAddToCart:q,onUpdateCartItemQuantity:G,onTableNumberChange:K,onCustomerNameChange:U,onCustomerMobileChange:V,processing:Z,placingOrder:J,orderSuccess:X,setOrderSuccess:Y,error:$,getTotalAmount:ee,tableNumber:et,customerName:el,customerMobile:er,orderLookup:en,setOrderLookup:ea,currentOrder:eo,setCurrentOrder:ei,onShowQRCode:es,restaurantId:null==R?void 0:R.id,restaurantName:ed,taxSett
1ings:ec,menuItems:eu,onClose:tg,upiSettings:eg,whatsappConnected:eh}):null})]}),e8&&(0,i.createPortal)((0,r.jsx)("div",{style:{position:"fixed",inset:0,backgroundColor:"rgba(0,0,0,0.4)",backdropFilter:"blur(4px)",zIndex:10002,display:"flex",alignItems:"center",justifyContent:"center",padding:"20px"},onClick:()=>e3(null),className:"jsx-74eec6f755072ede",children:(0,r.jsxs)("div",{style:{backgroundColor:"white",borderRadius:"16px",boxShadow:"0 24px 48px rgba(0,0,0,0.15)",width:"100%",maxWidth:"400px",maxHeight:"80vh",overflow:"auto"},onClick:e=>e.stopPropagation(),className:"jsx-74eec6f755072ede",children:[(0,r.jsxs)("div",{style:{padding:"16px 20px",borderBottom:"1px solid #f1f5f9",display:"flex",justifyContent:"space-between",alignItems:"center"},className:"jsx-74eec6f755072ede",children:[(0,r.jsxs)("div",{className:"jsx-74eec6f755072ede",children:[(0,r.jsxs)("div",{style:{fontSize:"15px",fontWeight:"700",color:"#111827"},className:"jsx-74eec6f755072ede",children:["Table ",e8.tableName]}),(0,r.jsxs)("div",{style:{fontSize:"12px",color:"#6b7280",marginTop:"2px"},className:"jsx-74eec6f755072ede",children:["Order #",e8.orderNumber||(null==(n=e8.id)?void 0:n.slice(-6))]}),(e8.items||[]).some(e=>null!=e.seat)&&(0,r.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px",marginTop:"4px"},className:"jsx-74eec6f755072ede",children:[...new Set((e8.items||[]).filter(e=>null!=e.seat).map(e=>e.seat))].sort((e,t)=>e-t).map(e=>{var t;return(0,r.jsx)("span",{style:{fontSize:"10px",fontWeight:"700",color:"#1d4ed8",backgroundColor:"#dbeafe",padding:"1px 6px",borderRadius:"999px"},className:"jsx-74eec6f755072ede",children:(0,w.OF)(e,null!=(t=e8.tableNumber)?t:e8.tableName)},e)})})]}),(0,r.jsx)("button",{onClick:()=>e3(null),style:{width:"28px",height:"28px",borderRadius:"8px",border:"none",backgroundColor:"#f1f5f9",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center"},className:"jsx-74eec6f755072ede",children:(0,r.jsx)(d.QCr,{size:12,color:"#6b7280"})})]}),(0,r.jsxs)("div",{style:{padding:"12px 20px"},className:"jsx-74eec6f755072ede",children:[(e8.items||[]).map((e,t)=>{var l;return(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",padding:"6px 0",borderBottom:t<(e8.items||[]).length-1?"1px solid #f8fafc":"none"},className:"jsx-74eec6f755072ede",children:[(0,r.jsxs)("div",{style:{flex:1,minWidth:0},className:"jsx-74eec6f755072ede",children:[(0,r.jsxs)("div",{style:{fontSize:"13px",fontWeight:"500",color:"#1f2937"},className:"jsx-74eec6f755072ede",children:[(0,r.jsxs)("span",{style:{color:"#6b7280",marginRight:"4px"},className:"jsx-74eec6f755072ede",children:[e.quantity||1,"x"]}),e.name,null!=e.seat&&(0,r.jsx)("span",{style:{fontSize:"10px",fontWeight:"700",color:"#1d4ed8",backgroundColor:"#dbeafe",padding:"1px 5px",borderRadius:"4px",marginLeft:"6px",verticalAlign:"middle"},className:"jsx-74eec6f755072ede",children:(0,w.OF)(e.seat)})]}),e.variant&&(0,r.jsx)("div",{style:{fontSize:"11px",color:"#9ca3af",marginTop:"1px",paddingLeft:"20px"},className:"jsx-74eec6f755072ede",children:"object"==typeof e.variant?e.variant.name:e.variant}),(null==(l=e.customizations)?void 0:l.length)>0&&(0,r.jsx)("div",{style:{fontSize:"11px",color:"#9ca3af",marginTop:"1px",paddingLeft:"20px"},className:"jsx-74eec6f755072ede",children:e.customizations.map(e=>e.name||e).join(", ")})]}),(0,r.jsx)("div",{style:{fontSize:"13px",fontWeight:"600",color:"#374151",flexShrink:0,marginLeft:"12px"},className:"jsx-74eec6f755072ede",children:ez((e.price||0)*(e.quantity||1))})]},t)}),(!e8.items||0===e8.items.length)&&(0,r.jsx)("div",{style:{textAlign:"center",padding:"20px",color:"#9ca3af",fontSize:"13px"},className:"jsx-74eec6f755072ede",children:"No items in this order"})]}),(0,r.jsxs)("div",{style:{padding:"12px 20px",borderTop:"1px dashed #e2e8f0",display:"flex",flexDirection:"column",gap:"4px"},className:"jsx-74eec6f755072ede",children:[null!=e8.subtotal&&(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"12px",color:"#6b7280"},className:"jsx-74eec6f755072ede",children:[(0,r.jsx)("span",{className:"jsx-74eec6f755072ede",children:"Subtotal"}),(0,r.jsx)("span",{className:"jsx-74eec6f755072ede",children:ez(e8.subtotal)})]}),(e8.taxes||e8.taxBreakdown||[]).map((e,t)=>(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"12px",color:"#6b7280"},className:"jsx-74eec6f755072ede",children:[(0,r.jsx)("span",{className:"jsx-74eec6f755072ede",children:e.name||"Tax"}),(0,r.jsx)("span",{className:"jsx-74eec6f755072ede",children:ez(e.amount||0)})]},t)),e8.discount>0&&(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"12px",color:"#059669"},className:"jsx-74eec6f755072ede",children:[(0,r.jsx)("span",{className:"jsx-74eec6f755072ede",children:"Discount"}),(0,r.jsxs)("span",{className:"jsx-74eec6f755072ede",children:["-",ez(e8.discount)]})]}),(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"15px",fontWeight:"700",color:"#111827",marginTop:"4px",paddingTop:"6px",borderTop:"1px solid #e2e8f0"},className:"jsx-74eec6f755072ede",children:[(0,r.jsx)("span",{className:"jsx-74eec6f755072ede",children:"Total"}),(0,r.jsx)("span",{className:"jsx-74eec6f755072ede",children:ez(e8.finalAmount||e8.total||0)})]})]}),(0,r.jsxs)("div",{style:{padding:"12px 20px 16px",display:"flex",gap:"8px"},className:"jsx-74eec6f755072ede",children:[(0,r.jsxs)("button",{onClick:()=>{e3(null),eO.push("/dashboard?orderId=".concat(e8.id,"&mode=edit&from=tables"))},style:{flex:1,padding:"10px",borderRadius:"10px",border:"none",fontSize:"13px",fontWeight:"600",background:"#059669",color:"white",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",gap:"6px"},className:"jsx-74eec6f755072ede",children:[(0,r.jsx)(d.OiG,{size:10})," Add Items"]}),(0,r.jsx)("button",{onClick:()=>e3(null),style:{padding:"10px 20px",borderRadius:"10px",border:"1px solid #e2e8f0",fontSize:"13px",fontWeight:"600",background:"white",color:"#6b7280",cursor:"pointer"},className:"jsx-74eec6f755072ede",children:"Close"})]})]})}),document.body),e1]})}}}]);

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.