import{t as e}from"./createLucideIcon-CPi6oOk3.js";import{n as t,t as n}from"./list-DbpM3fvO.js";import{_ as r}from"./vendor-flow-IzlrcDx6.js";import{rn as i}from"./index-HkVQGc9M.js";var a=e(`columns-2`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M12 3v18`,key:`108xh3`}]]),o=r(),s=e=>e?new Date(e).toLocaleDateString(`en-IN`,{day:`2-digit`,month:`short`,year:`numeric`}):`—`,c=e=>e?new Date(e).toLocaleString(`en-IN`,{day:`2-digit`,month:`short`,year:`numeric`,hour:`2-digit`,minute:`2-digit`}):`—`;function l({view:e,setView:r}){return(0,o.jsx)(`div`,{className:`inline-flex items-center rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-0.5`,children:[{v:`list`,icon:n,label:`List`},{v:`grid`,icon:t,label:`Grid`},{v:`split`,icon:a,label:`Split`}].map(t=>(0,o.jsxs)(`button`,{type:`button`,onClick:()=>r(t.v),title:t.label,className:i(`inline-flex items-center gap-1.5 px-2.5 py-1.5 rounded-md text-[12px] font-medium transition-colors`,e===t.v?`bg-[var(--color-primary)] text-white`:`text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)]`),children:[(0,o.jsx)(t.icon,{className:`w-3.5 h-3.5`}),(0,o.jsx)(`span`,{className:`hidden sm:inline`,children:t.label})]},t.v))})}var u=e=>`₹`+Number(e||0).toLocaleString(`en-IN`,{minimumFractionDigits:2,maximumFractionDigits:2}),d={draft:{label:`Draft`,dot:`bg-[var(--color-text-muted)]`,text:`text-[var(--color-text-secondary)]`,bg:`bg-[var(--color-info-bg)]`},placed:{label:`Placed`,dot:`bg-[var(--color-accent)]`,text:`text-[var(--color-accent-ink)]`,bg:`bg-[var(--color-accent-soft)]`},approved:{label:`Approved`,dot:`bg-[var(--color-info)]`,text:`text-[var(--color-info)]`,bg:`bg-[var(--color-info-bg)]`},dispatched:{label:`Dispatched`,dot:`bg-[var(--color-warning)]`,text:`text-[var(--color-warning)]`,bg:`bg-[var(--color-warning-bg)]`},delivered:{label:`Delivered`,dot:`bg-[var(--color-success)]`,text:`text-[var(--color-success)]`,bg:`bg-[var(--color-success-bg)]`},cancelled:{label:`Cancelled`,dot:`bg-[var(--color-error)]`,text:`text-[var(--color-error)]`,bg:`bg-[var(--color-error-bg)]`}};function f({status:e,className:t}){let n=d[e];return(0,o.jsxs)(`span`,{className:i(`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-[11px] font-bold`,n.bg,n.text,t),children:[(0,o.jsx)(`span`,{className:i(`w-1.5 h-1.5 rounded-full`,n.dot)}),n.label]})}var p={draft:`place`,placed:`approve`,approved:`dispatch`,dispatched:`deliver`,delivered:null,cancelled:null},m={place:`Place order`,approve:`Approve`,dispatch:`Dispatch`,deliver:`Mark delivered`,cancel:`Cancel`};export{s as a,l as i,p as n,c as o,f as r,u as s,m as t};