import{j as l,L as r}from"./index-DlcHsm52.js";import{S as i,T as o,C as c,B as u,r as m}from"./IdurarOs-j0IoqkpA.js";const p=[{value:"lead",label:"Lead"},{value:"customer",label:"Customer"},{value:"vendor_contact",label:"Vendor Contact"},{value:"partner",label:"Partner"}],x=[{value:"customer",label:"Customer"},{value:"lead",label:"Lead"},{value:"vendor",label:"Vendor"},{value:"partner",label:"Partner"}],y=[{value:"new",label:"New"},{value:"contacted",label:"Contacted"},{value:"qualified",label:"Qualified"},{value:"disqualified",label:"Disqualified"}],s=async({entity:a,id:e,jsonData:t,onSuccess:n})=>{const d=await m.update({entity:a,id:e,jsonData:t});return d!=null&&d.success&&n&&n(),d},C=({reload:a})=>[{title:"Name",dataIndex:"name"},{title:"Email",dataIndex:"email"},{title:"Phone",dataIndex:"phone"},{title:"Company",dataIndex:["company","name"],render:e=>e||"-"},{title:"Lead Score",dataIndex:"leadScore",render:e=>e||0},{title:"Stage",render:(e,t)=>l.jsx(i,{value:t.lifecycleStage,style:{width:150},options:p,onChange:n=>s({entity:"client",id:t._id,jsonData:{lifecycleStage:n},onSuccess:a})})}],h=()=>[{title:"Name",dataIndex:"name"},{title:"Email",dataIndex:"email"},{title:"Phone",dataIndex:"phone"},{title:"WhatsApp",dataIndex:"whatsapp",render:a=>a||"-"},{title:"Company",dataIndex:["company","name"],render:a=>a||"-"},{title:"Stage",dataIndex:"lifecycleStage",render:a=>l.jsx(o,{children:a})}],v=({reload:a})=>[{title:"Name",dataIndex:"name"},{title:"Type",dataIndex:"type",render:e=>l.jsx(o,{children:e})},{title:"Email",dataIndex:"email"},{title:"Phone",dataIndex:"phone"},{title:"Industry",dataIndex:"industry",render:e=>e||"-"},{title:"Actions",render:(e,t)=>l.jsx(i,{value:t.type,style:{width:140},options:x,onChange:n=>s({entity:"company",id:t._id,jsonData:{type:n},onSuccess:a})})}],b=({reload:a})=>[{title:"Title",dataIndex:"title"},{title:"Contact",dataIndex:["contact","name"],render:e=>e||"-"},{title:"Company",dataIndex:["company","name"],render:e=>e||"-"},{title:"Source",dataIndex:"source",render:e=>e||"-"},{title:"Score",dataIndex:"score",render:e=>e||0},{title:"Status",render:(e,t)=>l.jsx(i,{value:t.status,style:{width:160},options:y,onChange:n=>s({entity:"lead",id:t._id,jsonData:{status:n},onSuccess:a})})},{title:"Actions",render:()=>l.jsx(c,{children:l.jsx(u,{size:"small",children:l.jsx(r,{to:"/deals",children:"Open Deal Pipeline"})})})}];export{p as C,y as L,x as a,v as b,C as c,b as l,h as p};
