1import{i as b,t as g}from"./react-C6JdJxIB.js";import{t as f}from"./jsx-runtime-CGXBp6bb.js";import{t as s}from"./trans-PZ_OsZUf.js";import{t as j}from"./CentralLayout-B7lm4y_K.js";var c=b(g(),1),e=f(),x={New:"bg-slate-100 text-slate-700",Contacted:"bg-blue-100 text-blue-700",Qualified:"bg-amber-100 text-amber-700",Proposal:"bg-violet-100 text-violet-700",Won:"bg-emerald-100 text-emerald-700",Lost:"bg-rose-100 text-rose-700"},N={Website:"bg-sky-100 text-sky-700",Referral:"bg-purple-100 text-purple-700","Social Media":"bg-pink-100 text-pink-700","Cold Call":"bg-orange-100 text-orange-700",Email:"bg-teal-100 text-teal-700"},y=[{id:1,name:"Annette Black",company:"TechCorp Inc.",email:"[email protected]",phone:"+1 555-0101",status:"New",source:"Website",value:"$12,000",created:"Apr 20, 2026"},{id:2,name:"Wade Warren",company:"Bright Ideas",email:"[email protected]",phone:"+1 555-0102",status:"Contacted",source:"Referral",value:"$8,500",created:"Apr 19, 2026"},{id:3,name:"Esther Howard",company:"BlueSky Ltd.",email:"[email protected]",phone:"+1 555-0103",status:"Qualified",source:"Social Media",value:"$22,000",created:"Apr 18, 2026"},{id:4,name:"Cameron Williamson",company:"Peak Solutions",email:"[email protected]",phone:"+1 555-0104",status:"Proposal",source:"Cold Call",value:"$15,750",created:"Apr 17, 2026"},{id:5,name:"Brooklyn Simmons",company:"Nova Corp",email:"[email protected]",phone:"+1 555-0105",status:"Won",source:"Email",value:"$9,800",created:"Apr 16, 2026"},{id:6,name:"Leslie Alexander",company:"Acme Inc.",email:"[email protected]",phone:"+1 555-0106",status:"Lost",source:"Website",value:"$5,200",created:"Apr 15, 2026"},{id:7,name:"Jenny Wilson",company:"GreenTech",email:"[email protected]",phone:"+1 555-0107",status:"New",source:"Referral",value:"$18,000",created:"Apr 14, 2026"}],m=["All","New","Contacted","Qualified","Proposal","Won","Lost"];function L({admin:p,leads:a=y}){const[l,u]=(0,c.useState)(""),[r,d]=(0,c.useState)("All"),i=a.filter(t=>{const o=t.name.toLowerCase().includes(l.toLowerCase())||t.company.toLowerCase().includes(l.toLowerCase())||t.email.toLowerCase().includes(l.toLowerCase()),n=r==="All"||t.status===r;return o&&n}),h=m.slice(1).reduce((t,o)=>(t[o]=a.filter(n=>n.status===o).length,t),{});return(0,e.jsxs)(j,{section:"crm",title:"Leads",user:p,currentRoute:"crm.leads",children:[(0,e.jsxs)("div",{className:"mb-6 flex items-center justify-between gap-4 flex-wrap",children:[(0,e.jsxs)("div",{children:[(0,e.jsxs)("h2",{className:"text-xl font-bold text-slate-800",children:["Leads"," ",(0,e.jsx)("span",{className:"ml-2 rounded-full bg-indigo-100 px-2.5 py-0.5 text-sm font-semibold text-indigo-700",children:a.length})]}),(0,e.jsx)("p",{className:"text-sm text-slate-500 mt-0.5",children:"Track and manage your leads"})]}),(0,e.jsxs)("button",{className:"rounded-xl bg-indigo-600 px-4 py-2.5 text-sm font-semibold text-white hover:bg-indigo-500 transition-colors shadow-sm",children:["+ ",s("add_lead")]})]}),(0,e.jsx)("div",{className:"mb-6 grid grid-cols-2 gap-3 sm:grid-cols-3 xl:grid-cols-6",children:m.slice(1).map(t=>(0,e.jsxs)("button",{onClick:()=>d(t),className:`rounded-xl border p-3 text-center transition-all ${r===t?"border-indigo-300 bg-indigo-50 ring-1 ring-indigo-300":"border-slate-100 bg-white hover:border-indigo-200"}`,children:[(0,e.jsx)("p",{className:"text-xl font-bold text-slate-800",children:h[t]}),(0,e.jsx)("span",{className:`mt-1 inline-block rounded-full px-2 py-0.5 text-xs font-semibold ${x[t]}`,children:t})]},t))}),(0,e.jsxs)("div",{className:"mb-5 flex items-center gap-3 flex-wrap",children:[(0,e.jsxs)("div",{className:"relative flex-1 min-w-56",children:[(0,e.jsx)("svg",{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-slate-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),(0,e.jsx)("input",{type:"text",placeholder:"Search leads...",value:l,onChange:t=>u(t.target.value),className:"w-full rounded-xl border border-slate-200 bg-white pl-9 pr-4 py-2.5 text-sm text-slate-700 focus:border-indigo-400 focus:outline-none focus:ring-2 focus:ring-indigo-100"})]}),(0,e.jsx)("div",{className:"flex gap-2",children:(0,e.jsx)("button",{onClick:()=>d("All"),className:`rounded-xl px-3 py-2 text-xs font-semibold transition-colors ${r==="All"?"bg-slate-800 text-white":"bg-white border border-slate-200 text-slate-600 hover:border-slate-300"}`,children:s("all")})}),(0,e.jsx)("div",{className:"flex gap-2 ml-auto",children:(0,e.jsx)("button",{className:"rounded-xl border border-slate-200 bg-white px-3 py-2.5 text-sm text-slate-600 hover:bg-slate-50 transition-colors",children:s("export")})})]}),(0,e.jsxs)("div",{className:"rounded-2xl bg-white border border-slate-100 shadow-sm overflow-hidden",children:[(0,e.jsx)("div",{className:"overflow-x-auto",children:(0,e.jsxs)("table",{className:"w-full text-sm",children:[(0,e.jsx)("thead",{children:(0,e.jsxs)("tr",{className:"border-b border-slate-100 bg-slate-50/70",children:[(0,e.jsx)("th",{className:"w-8 px-5 py-3",children:(0,e.jsx)("input",{type:"checkbox",className:"rounded border-slate-300"})}),(0,e.jsx)("th",{className:"px-5 py-3 text-left text-xs font-semibold uppercase tracking-wider text-slate-400",children:"Lead"}),(0,e.jsx)("th",{className:"px-5 py-3 text-left text-xs font-semibold uppercase tracking-wider text-slate-400",children:"Company"}),(0,e.jsx)("th",{className:"px-5 py-3 text-left text-xs font-semibold uppercase tracking-wider text-slate-400",children:"Source"}),(0,e.jsx)("th",{className:"px-5 py-3 text-left text-xs font-semibold uppercase tracking-wider text-slate-400",children:"Status"}),(0,e.jsx)("th",{className:"px-5 py-3 text-right text-xs font-semibold uppercase tracking-wider text-slate-400",children:"Value"}),(0,e.jsx)("th",{className:"px-5 py-3 text-left text-xs font-semibold uppercase tracking-wider text-slate-400",children:"Created"}),(0,e.jsx)("th",{className:"px-5 py-3 text-right text-xs font-semibold uppercase tracking-wider text-slate-400",children:"Actions"})]})}),(0,e.jsx)("tbody",{className:"divide-y divide-slate-50",children:i.length===0?(0,e.jsx)("tr",{children:(0,e.jsx)("td",{colSpan:8,className:"px-5 py-12 text-center text-slate-400",children:"No leads found."})}):i.map(t=>(0,e.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,e.jsx)("td",{className:"px-5 py-3.5",children:(0,e.jsx)("input",{type:"checkbox",className:"rounded border-slate-300"})}),(0,e.jsx)("td",{className:"px-5 py-3.5",children:(0,e.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,e.jsx)("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-indigo-100 text-indigo-700 text-xs font-bold",children:t.name[0]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"font-medium text-slate-800",children:t.name}),(0,e.jsx)("p",{className:"text-xs text-slate-400",children:t.email})]})]})}),(0,e.jsx)("td",{className:"px-5 py-3.5 text-slate-600",children:t.company}),(0,e.jsx)("td",{className:"px-5 py-3.5",children:(0,e.jsx)("span",{className:`rounded-full px-2.5 py-1 text-xs font-semibold ${N[t.source]??"bg-slate-100 text-slate-600"}`,children:t.source})}),(0,e.jsx)("td",{className:"px-5 py-3.5",children:(0,e.jsx)("span",{className:`rounded-full px-2.5 py-1 text-xs font-semibold ${x[t.status]}`,children:t.status})}),(0,e.jsx)("td",{className:"px-5 py-3.5 text-right font-semibold text-slate-800",children:t.value}),(0,e.jsx)("td",{className:"px-5 py-3.5 text-slate-400 text-xs",children:t.created}),(0,e.jsx)("td",{className:"px-5 py-3.5",children:(0,e.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,e.jsx)("button",{className:"rounded-lg p-1.5 text-slate-400 hover:bg-indigo-50 hover:text-indigo-600 transition-colors",title:s("edit"),children:"âï¸"}),(0,e.jsx)("button",{className:"rounded-lg p-1.5 text-slate-400 hover:bg-rose-50 hover:text-rose-600 transition-colors",title:s("delete"),children:"ðï¸"})]})})]},t.id))})]})}),(0,e.jsxs)("div",{className:"flex items-center justify-between border-t border-slate-100 px-5 py-3 text-xs text-slate-500",children:[(0,e.jsxs)("span",{children:["Showing ",i.length," of ",a.length," leads"]}),(0,e.jsx)("div",{className:"flex gap-1",children:[1,2,3].map(t=>(0,e.jsx)("button",{className:`rounded-lg px-3 py-1.5 font-medium ${t===1?"bg-indigo-600 text-white":"text-slate-600 hover:bg-slate-100"}`,children:t},t))})]})]})]})}export{L 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.