import{c as r}from"./index-DlNZgIG9.js";const s=1.5,d={fontVariantNumeric:"tabular-nums"},O={fontSize:11,lineHeight:1.4,fontWeight:600,letterSpacing:"0.07em",textTransform:"uppercase",color:"text.secondary"},I={borderRadius:s,boxShadow:"none",borderColor:"divider"},l=t=>({"& .MuiCardContent-root":{p:t,"&:last-child":{pb:t}}}),E={green:{light:"#2e7d32",dark:"#4ade80"},red:{light:"#d32f2f",dark:"#f87171"},amber:{light:"#ed6c02",dark:"#fbbf24"},blue:{light:"#0277bd",dark:"#60a5fa"},indigo:{light:"#1565c0",dark:"#818cf8"},purple:{light:"#6a1b9a",dark:"#c084fc"},cyan:{light:"#00838f",dark:"#22d3ee"},pink:{light:"#c2185b",dark:"#f472b6"},slate:{light:"#546e7a",dark:"#94a3b8"}},o=(t,e)=>E[t][e],c={CRITICAL:"red",HIGH:"amber",WARNING:"amber",MEDIUM:"blue",OPPORTUNITY:"cyan",POSITIVE:"green",AT_RISK:"amber",HEALTHY:"green",EXCELLENT:"green"},R=(t,e)=>o(c[t]??"slate",e),A={LEAD:"blue",FOLLOW_UP:"cyan",ART_APPROVAL:"purple",COST_ESTIMATION:"amber",QUOTATION:"pink",ORDER:"green"},S={LEAD:"Lead",FOLLOW_UP:"Follow-up",ART_APPROVAL:"Art Approval",COST_ESTIMATION:"Cost Estimation",QUOTATION:"Proforma Invoice",ORDER:"Order"},_=(t,e)=>o(A[t]??"slate",e),a=new Intl.NumberFormat("en-IN",{maximumFractionDigits:0}),N=t=>{const e=Math.abs(t??0),n=(t??0)<0?"-":"";return e>=1e7?`${n}₹${(e/1e7).toFixed(e>=1e8?0:1)} Cr`:e>=1e5?`${n}₹${(e/1e5).toFixed(e>=1e6?0:1)} L`:e>=1e3?`${n}₹${(e/1e3).toFixed(0)}K`:`${n}₹${a.format(Math.round(e))}`},L=t=>a.format(Math.round(t??0)),u=(t,e=1)=>`${(t??0).toFixed(e)}%`,C=t=>t==null||t<=0?"—":`${t.toFixed(1)} d`,D=(t,e=1)=>t==null?"—":`${t>0?"+":""}${t.toFixed(e)}%`,f=(t,e)=>e==null||e===0?null:((t??0)-e)/e*100,T={LEADS:r.LEADS,CHECK_IN:r.CHECK_IN,ART_DESIGN:r.ART_DESIGN,COST_ESTIMATION:r.COST_ESTIMATION,QUOTATION:r.QUOTATION,ORDER:r.ORDER,FOLLOW_UP:r.CHECK_IN},g=t=>t&&T[t]||null,m=t=>{switch(t){case"STALE_LEAD":return r.LEADS;case"IDLE_ESTIMATION":return r.COST_ESTIMATION;case"UNANSWERED_ART":return r.ART_DESIGN;case"OVERDUE_FOLLOW_UP":return r.CHECK_IN;case"UNPAID_ORDER":return r.ORDER;default:return null}},b={STALE_LEAD:"Stale lead",IDLE_ESTIMATION:"Idle estimation",UNANSWERED_ART:"Unanswered artwork",OVERDUE_FOLLOW_UP:"Overdue follow-up",UNPAID_ORDER:"Uncollected order"};export{O as L,d as N,I as P,s as R,S,o as a,R as b,l as c,_ as d,C as e,b as f,f as g,m as h,N as m,L as n,u as p,g as r,D as s};
