PageSourceSearch

https://www.kptsocial.ai/assets/DashboardQuotes-BL56Vqpm.js

js kptsocial.ai collected 2026-10-05 15:37:43 UTC 22,781 bytes, 2 lines download raw bytes

1import{r as m,O as ne,j as e,cL as ee,an as O,aT as le,a8 as z,w as ie,ax as de,cq as G,du as V,be as ce,bJ as oe,ak as me,X as xe,x as ue,z as he,aC as je}from"./react-vendor-BkChfqEJ.js";import{s as pe}from"./index-Ahd0YMvp.js";import{D as fe}from"./DashboardLayout-i4sT0ztC.js";import{C as f,b as g,c as N,a as b}from"./card-7BWcDNuw.js";import{B as k}from"./button-C5OpcqhK.js";import{I as ge}from"./input-Douzf6CG.js";import{S as v}from"./skeleton-G8ISX4de.js";import{S as U,a as K,b as Y,c as X,d as M}from"./select-CU5zTFRK.js";import{R as W,P as Ne,b as be,d as ve,T as H,L as J,B as ye,X as we,Y as _e,e as Z}from"./charts-B1GiDnUo.js";import{P as I,Q as ke,D as F,w as Me,s as Se,h as R}from"./date-utils-CUsfE3va.js";import"./ui-BQCqNqg0.js";import"./query-vendor-C7_lE9wR.js";import"./i18n-vendor-CZb6-6VF.js";import"./supabase-vendor-CQeXRQU-.js";import"./dropdown-menu-BFU7qKcc.js";function Ce(r){if(r==="all")return null;const d=new Date;switch(r){case"7d":return{start:R(d,7),end:d};case"30d":return{start:R(d,30),end:d};case"90d":return{start:R(d,90),end:d};case"mtd":return{start:Se(d),end:d};case"ytd":return{start:Me(d),end:d}}}const De={"7d":"Last 7 Days","30d":"Last 30 Days","90d":"Last 90 Days",mtd:"Month to Date",ytd:"Year to Date",all:"All Time"};function c(r){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0}).format(r)}function Te(r){if(!r)return"—";try{return F(I(r),"MMM d, yyyy")}catch{return"—"}}function se(r){if(!r)return"—";try{return F(I(r),"MMM d, yyyy h:mm a")}catch{return"—"}}const Be={Starter:"#22c55e",Growth:"#3b82f6",Enterprise:"#a855f7",Custom:"#f59e0b"},Ee={Starter:"bg-emerald-500/20 text-emerald-400 border-emerald-500/30",Growth:"bg-blue-500/20 text-blue-400 border-blue-500/30",Enterprise:"bg-purple-500/20 text-purple-400 border-purple-500/30",Custom:"bg-amber-500/20 text-amber-400 border-amber-500/30"};function A({tier:r}){return r?e.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${Ee[r]||"bg-slate-500/20 text-slate-400 border-slate-500/30"}`,children:r}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"—"})}function q({rows:r=5}){return e.jsx("div",{className:"space-y-3",children:Array.from({length:r}).map((d,j)=>e.jsx(v,{className:"h-10 w-full"},j))})}function C({message:r}){return e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx("div",{className:"h-12 w-12 rounded-full bg-muted flex items-center justify-center mb-4",children:e.jsx(ee,{className:"h-6 w-6 text-muted-foreground"})}),e.jsx("p",{className:"text-muted-foreground text-sm max-w-md",children:r})]})}function Pe(r,d){const j=["Date","Name","Email","Phone","Company","Industry","Monthly Revenue","Employees","Locations","Tier","Price Min","Price Max","Timeline","Primary Goal","Email Sent"],D=r.map(t=>[se(t.created_at),`${t.first_name} ${t.last_name||""}`.trim(),t.email,t.phone||"",t.company||"",t.industry||"",t.monthly_revenue?.toString()||"",t.employee_count?.toString()||"",t.locations?.toString()||"",t.tier||"",t.price_min?.toString()||"",t.price_max?.toString()||"",t.estimated_timeline||"",t.primary_goal||"",t.email_sent?"Yes":"No"]),y=[j,...D].map(t=>t.map(_=>`"${_}"`).join(",")).join(`
2`),T=new Blob([y],{type:"text/csv"}),w=URL.createObjectURL(T),x=document.createElement("a");x.href=w,x.download=d,x.click(),URL.revokeObjectURL(w)}const We=()=>{const[r,d]=m.useState("all"),[j,D]=m.useState("all"),[y,T]=m.useState(""),[w,x]=m.useState(1),[t,_]=m.useState(null),B=15,{data:$=[],isLoading:p}=ne({queryKey:["dashboard-quotes"],queryFn:async()=>{const{data:s,error:a}=await pe.from("quotes").select("*").order("created_at",{ascending:!1});if(a)throw a;return s||[]}}),S=m.useMemo(()=>Ce(r),[r]),o=m.useMemo(()=>{let s=$;if(S&&(s=s.filter(a=>{if(!a.created_at)return!1;const h=I(a.created_at);return ke(h,{start:S.start,end:S.end})})),j!=="all"&&(s=s.filter(a=>a.tier===j)),y){const a=y.toLowerCase();s=s.filter(h=>`${h.first_name} ${h.last_name||""}`.toLowerCase().includes(a)||h.email.toLowerCase().includes(a)||(h.company||"").toLowerCase().includes(a)||(h.industry||"").toLowerCase().includes(a))}return s},[$,S,j,y]),u=m.useMemo(()=>{const s=Math.max(1,Math.ceil(o.length/B)),a=Math.min(w,s);return{rows:o.slice((a-1)*B,a*B),total:o.length,totalPages:s,page:a}},[o,w]),i=m.useMemo(()=>{const s=o.length,a={};o.forEach(l=>{const n=l.tier||"Unknown";a[n]||(a[n]={count:0,totalMin:0,totalMax:0}),a[n].count+=1,a[n].totalMin+=l.price_min||0,a[n].totalMax+=l.price_max||0});const h=Object.entries(a).map(([l,n])=>({tier:l,count:n.count,avgMin:n.count>0?Math.round(n.totalMin/n.count):0,avgMax:n.count>
20?Math.round(n.totalMax/n.count):0,pct:s>0?(n.count/s*100).toFixed(0):"0"})).sort((l,n)=>n.count-l.count),te=o.filter(l=>l.email_sent).length,P={};o.forEach(l=>{l.industry&&(P[l.industry]=(P[l.industry]||0)+1)});const ae=Object.entries(P).sort(([,l],[,n])=>n-l).slice(0,5).map(([l,n])=>({name:l,count:n})),L=o.filter(l=>l.price_mid),re=L.length>0?Math.round(L.reduce((l,n)=>l+(n.price_mid||0),0)/L.length):0;return{total:s,tierBreakdown:h,emailsSent:te,topIndustries:ae,avgValue:re}},[o]),E=m.useMemo(()=>i.tierBreakdown.map(s=>({name:s.tier,value:s.count,fill:Be[s.tier]||"#6b7280"})),[i.tierBreakdown]),Q=m.useMemo(()=>i.tierBreakdown.map(s=>({tier:s.tier,avgMin:s.avgMin,avgMax:s.avgMax})),[i.tierBreakdown]);return e.jsxs(fe,{children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-heading font-bold text-foreground",children:"Quotes Dashboard"}),e.jsx("p",{className:"text-muted-foreground text-sm mt-1",children:"Track estimator submissions, tier demand, and average quote values"})]}),e.jsx("div",{className:"flex items-center gap-3",children:e.jsxs(U,{value:r,onValueChange:s=>{d(s),x(1)},children:[e.jsx(K,{className:"w-[160px]",children:e.jsx(Y,{})}),e.jsx(X,{children:Object.entries(De).map(([s,a])=>e.jsx(M,{value:s,children:a},s))})]})})]}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[e.jsxs(f,{className:"transition-all hover:shadow-lg",children:[e.jsxs(g,{className:"flex flex-row items-center justify-between pb-2",children:[e.jsx(N,{className:"text-sm font-medium text-muted-foreground",children:"Total Quotes"}),e.jsx(ee,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsx(b,{children:p?e.jsx(v,{className:"h-8 w-24"}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"text-2xl font-bold",children:i.total}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[i.emailsSent," email",i.emailsSent!==1?"s":""," sent"]})]})})]}),e.jsxs(f,{className:"transition-all hover:shadow-lg",children:[e.jsxs(g,{className:"flex flex-row items-center justify-between pb-2",children:[e.jsx(N,{className:"text-sm font-medium text-muted-foreground",children:"Avg Quote Value"}),e.jsx(O,{className:"h-4 w-4 text-emerald-400"})]}),e.jsx(b,{children:p?e.jsx(v,{className:"h-8 w-24"}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"text-2xl font-bold text-emerald-400",children:c(i.avgValue)}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"mid-point estimate"})]})})]}),e.jsxs(f,{className:"transition-all hover:shadow-lg",children:[e.jsxs(g,{className:"flex flex-row items-center justify-between pb-2",children:[e.jsx(N,{className:"text-sm font-medium text-muted-foreground",children:"Hottest Tier"}),e.jsx(le,{className:"h-4 w-4 text-amber-400"})]}),e.jsx(b,{children:p?e.jsx(v,{className:"h-8 w-24"}):i.tierBreakdown.length>0?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"text-2xl font-bold",children:i.tierBreakdown[0].tier}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[i.tierBreakdown[0].count," quotes (",i.tierBreakdown[0].pct,"%)"]})]}):e.jsx("div",{className:"text-2xl font-bold text-muted-foreground",children:"—"})})]}),e.jsxs(f,{className:"transition-all hover:shadow-lg",children:[e.jsxs(g,{className:"flex flex-row items-center justify-between pb-2",children:[e.jsx(N,{className:"text-sm font-medium text-muted-foreground",children:"Top Industry"}),e.jsx(z,{className:"h-4 w-4 text-blue-400"})]}),e.jsx(b,{children:p?e.jsx(v,{className:"h-8 w-24"}):i.topIndustries.length>0?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"text-2xl font-bold truncate",children:i.topIndustries[0].name}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[i.topIndustries[0].count," quote",i.topIndustries[0].count!==1?"s":""]})]}):e.jsx("div",{className:"text-2xl font-bold text-muted-foreground",children:"—"})})]})]}),e.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[e.jsxs(f,{children:[e.jsx(g,{children:e.jsx(N,{className:"text-lg",children:"Tier Distribution"})}),e.jsx(b,{children:p?e.jsx(v,{className:"h-[300px] w-full"}):E.length===0?e.jsx(C,{message:"No quotes yet to display tier distribution."}):e.jsx(W,{width:"100%",height:300,children:e.jsxs(Ne,{children:[e.jsx(be,{data:E,cx:"50%",cy:"50%",innerRadius:70,outerRadius:110,paddingAngle:4,dataKey:"value",label:({name:s,percent:a})=>`${s} ${(a*100).toFixed(0)}%`,children:E.map((s,a)=>e.jsx(ve,{fill:s.fill},a))}),e.jsx(H,{formatter:(s,a)=>[`${s} quotes`,a],contentStyle:{background:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"8px",color:"hsl(var(--foreground))"}}),e.jsx(J,{})]})})})]}),e.jsxs(f,{children:[e.jsx(g,{children:e.jsx(N,{className:"text-lg",children:"Average Quote Value by Tier"})}),e.jsx(b,{children:p?e.jsx(v,{className:"h-[300px] w-full"}):Q.length===0?e.jsx(C,{message:"Average values will appear once quotes are submitted."}):e.jsx(W,{width:"100%",height:300,children:e.jsxs(ye,{data:Q,margin:{left:10,right:10},children:[e.jsx(we,{dataKey:"tier",stroke:"hsl(var(--muted-foreground))",fontSize:12}),e.jsx(_e,{tickFormatter:s=>`$${(s/1e3).toFixed(0)}k`,stroke:"hsl(var(--muted-foreground))",fontSize:12}),e.jsx(H,{formatter:s=>c(s),contentStyle:{background:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"8px",color:"hsl(var(--foreground))"}}),e.jsx(Z,{dataKey:"avgMin",name:"Avg Min",fill:"#3b82f6",radius:[4,4,0,0]}),e.jsx(Z,{dataKey:"avgMax",name:"Avg Max",fill:"#8b5cf6",radius:[4,4,0,0]}),e.jsx(J,{})]})})})]})]}),e.jsxs(f,{children:[e.jsx(g,{children:e.jsx(N,{className:"text-lg",children:"Tier Breakdown"})}),e.jsx(b,{children:p?e.jsx(q,{rows:4}):i.tierBreakdown.length===0?e.jsx(C,{message:"No quotes to analyze yet."}):e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-border text-left text-muted-foreground",children:[e.jsx("th",{className:"pb-2 font-medium",children:"Tier"}),e.jsx("th",{className:"pb-2 font-medium text-right",children:"Quotes"}),e.jsx("th",{className:"pb-2 font-medium text-right",children:"% of Total"}),e.jsx("th",{className:"pb-2 font-medium text-right",children:"Avg Min Price"}),e.jsx("th",{className:"pb-2 font-medium text-right",children:"Avg Max Price"})]})}),e.jsx("tbody",{children:i.tierBreakdown.map(s=>e.jsxs("tr",{className:"border-b border-border/50 hover:bg-muted/30",children:[e.jsx("td",{className:"py-2.5",children:e.jsx(A,{tier:s.tier})}),e.jsx("td",{className:"py-2.5 text-right font-medium",children:s.count}),e.jsxs("td",{className:"py-2.5 text-right",children:[s.pct,"%"]}),e.jsx("td",{className:"py-2.5 text-right",children:c(s.avgMin)}),e.jsx("td",{className:"py-2.5 text-right",children:c(s.avgMax)})]},s.tier))})]})})})]}),e.jsxs(f,{children:[e.jsxs(g,{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[e.jsx(N,{className:"text-lg",children:"All Quotes"}),e.jsxs(k,{variant:"outline",size:"sm",onClick:()=>Pe(o,`kpt-quotes-${F(new Date,"yyyy-MM-dd")}.csv`),disabled:o.length===0,children:[e.jsx(ie,{className:"h-4 w-4 mr-2"}),"Export CSV"]})]}),e.jsxs(b,{children:[e.jsxs("div",{className:"flex flex-wrap gap-3 mb-4",children:[e.jsxs(U,{value:j,onValueChange:s=>{D(s),x(1)},children:[e.jsx(K,{className:"w-[140px]",children:e.jsx(Y,{placeholder:"Tier"})}),e.jsxs(X,{children:[e.jsx(M,{value:"all",children:"All Tiers"}),e.jsx(M,{value:"Starter",children:"Starter"}),e.jsx(M,{value:"Growth",children:"Growth"}),e.jsx(M,{value:"Enterprise",children:"Enterprise"})]})]}),e.jsxs("div",{className:"relative flex-1 min-w-[200px]",children:[e.jsx(de,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(ge,{placeholder:"Search by name, email, company, or industry...",value:y,onChange:s=>{T(s.target.value),x(1)},className:"pl-9"})]})]}),p?e.jsx(q,{rows:8}):u.rows.length===0?e.jsx(C,{message:"No quotes match your current filters."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-border text-left text-muted-foreground",children:[e.jsx("th",{className:"pb-2 font-medium",children:"Date"}),e.jsx("th",{className:"pb-2 font-medium",children:"Contact"}),e.jsx("th",{className:"pb-2 font-medium",children:"Industry"}),e.jsx("th",{className:"pb-2 font-medium",children:"Tier"}),e.jsx("th",{className:"pb-2 font-medium text-right",children:"Price Range"}),e.jsx("th",{className:"pb-2 font-medium text-center",children:"Email"}),e.jsx("th",{className:"pb-2 font-medium",children:"Action"})]})}),e.jsx("tbody",{children:u.rows.map(s=>e.jsxs("tr",{className:"border-b border-border/50 hover:bg-muted/30",children:[e.jsx("td",{className:"py-2.5 whitespace-nowrap",children:Te(s.created_at)}),e.jsxs("td",{className:"py-2.5",children:[e.jsxs("div",{className:"font-medium",children:[s.first_name," ",s.last_name||""]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:s.email}),s.company&&e.jsx("div",{className:"text-xs text-muted-foreground",children:s.company})]}),e.jsx("td",{className:"py-2.5 text-sm",children:s.industry||"—"}),e.jsx("td",{className:"py-2.5",children:e.jsx(A,{tier:s.tier})}),e.jsx("td",{className:"py-2.5 text-right whitespace-nowrap",children:s.price_min&&s.price_max?`${c(s.price_min)} – ${c(s.price_max)}`:"—"}),e.jsx("td",{className:"py-2.5 text-center",children:s.email_sent?e.jsx(G,{className:"h-4 w-4 text-emerald-400 inline"}):e.jsx(V,{className:"h-4 w-4 text-slate-500 inline"})}),e.jsx("td",{className:"py-2.5",children:e.jsxs(k,{size:"sm",variant:"ghost",onClick:()=>_(s),className:"gap-1",children:[e.jsx(ce,{className:"h-3.5 w-3.5"})," View"]})})]},s.id))})]})}),e.jsxs("div",{className:"flex items-center justify-between mt-4 text-sm text-muted-foreground",children:[e.jsxs("span",{children:[u.total," quote",u.total!==1?"s":""]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(k,{variant:"outline",size:"icon",className:"h-8 w-8",disabled:u.page<=1,onClick:()=>x(s=>s-1),children:e.jsx(oe,{className:"h-4 w-4"})}),e.jsxs("span",{children:["Page ",u.page," of ",u.totalPages]}),e.jsx(k,{variant:"outline",size:"icon",className:"h-8 w-8",disabled:u.page>=u.totalPages,onClick:()=>x(s=>s+1),children:e.jsx(me,{className:"h-4 w-4"})})]})]})]})]})]})]}),t&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm",onClick:()=>_(null),children:e.jsxs("div",{className:"bg-card border border-border rounded-xl shadow-2xl w-full max-w-2xl max-h-[85vh] overflow-y-auto m-4",onClick:s=>s.stopPropagation(),children:[e.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border sticky top-0 bg-card z-10",children:[e.jsxs("div",{children:[e.jsxs("h2",{className:"text-xl font-heading font-bold",children:[t.first_name," ",t.last_name||""]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:se(t.created_at)})]}),e.jsx(k,{variant:"ghost",size:"icon",onClick:()=>_(null),children:e.jsx(xe,{className:"h-5 w-5"})})]}),e.jsxs("div",{className:"p-6 space-y-6",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wide mb-3 flex items-center gap-2",children:[e.jsx(z,{className:"h-4 w-4"})," Contact Information"]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Email:"})," ",e.jsx("span",{className:"font-medium",children:t.email})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Phone:"})," ",e.jsx("span",{className:"font-medium",children:t.phone||"—"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Company:"})," ",e.jsx("span",{className:"font-medium",children:t.company||"—"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Email Sent:"})," ",t.email_sent?e.jsx(G,{className:"h-4 w-4 text-emerald-400 inline"}):e.jsx(V,{className:"h-4 w-4 text-slate-500 inline"})]})]})]}),e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wide mb-3 flex items-center gap-2",children:[e.jsx(ue,{className:"h-4 w-4"})," Business Profile"]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Industry:"})," ",e.jsx("span",{className:"font-medium",children:t.industry||"—"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Monthly Revenue:"})," ",e.jsx("span",{className:"font-medium",children:t.monthly_revenue?c(t.monthly_revenue):"—"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Employees:"})," ",e.jsx("span",{className:"font-medium",children:t.employee_count||"—"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Locations:"})," ",e.jsx("span",{className:"font-medium",children:t.locations||"—"})]})]})]}),(t.primary_goal||t.timeline)&&e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wide mb-3 flex items-center gap-2",children:[e.jsx(he,{className:"h-4 w-4"})," Goals & Timeline"]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[t.primary_goal&&e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Primary Goal:"})," ",e.jsx("span",{className:"font-medium",children:t.primary_goal})]}),t.timeline&&e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Timeline:"})," ",e.jsx("span",{className:"font-medium",children:t.timeline})]}),t.support_level&&e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Support Level:"})," ",e.jsx("span",{className:"font-medium",children:t.support_level})]})]})]}),t.current_systems?.length||t.integrations_needed?.length?e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wide mb-3",children:"Systems & Integrations"}),e.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[t.current_systems?.length?e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground block mb-1",children:"Current Systems:"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:t.current_systems.map(s=>e.jsx("span",{className:"inline-block px-2 py-0.5 rounded bg-muted text-xs",children:s},s))})]}):null,t.integrations_needed?.length?e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground block mb-1",children:"Integrations Needed:"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:t.integrations_needed.map(s=>e.jsx("span",{className:"inline-block px-2 py-0.5 rounded bg-muted text-xs",children:s},s))})]}):null]})]}):null,e.jsxs("div",{className:"bg-muted/30 border border-border rounded-lg p-4",children:[e.jsxs("h3",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wide mb-3 flex items-center gap-2",children:[e.jsx(O,{className:"h-4 w-4"})," Estimate"]}),e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx(A,{tier:t.tier}),e.jsx("span",{className:"text-xl font-bold",children:t.price_min&&t.price_max?`${c(t.price_min)} – ${c(t.price_max)}`:"—"})]}),t.estimated_timeline&&e.jsxs("div",{className:"text-sm flex items-center gap-2 mb-2",children:[e.jsx(je,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"Timeline:"}),e.jsx("span",{className:"font-medium",children:t.estimated_timeline})]}),t.payment_structure&&e.jsxs("div",{className:"mt-3 pt-3 border-t border-border/50 grid grid-cols-3 gap-3 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground block text-xs",children:"Roadmap Fee"}),e.jsx("span",{className:"font-medium",children:c(Number(t.payment_structure.roadmapFee)||0)})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground block text-xs",children:"Deposit"
2}),e.jsx("span",{className:"font-medium",children:c(Number(t.payment_structure.deposit)||0)})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground block text-xs",children:"Monthly"}),e.jsxs("span",{className:"font-medium",children:[c(Number(t.payment_structure.monthlyPayment)||0),"/mo"]})]})]}),t.projected_roi&&e.jsxs("div",{className:"mt-3 pt-3 border-t border-border/50 grid grid-cols-3 gap-3 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground block text-xs",children:"Monthly Benefit"}),e.jsx("span",{className:"font-medium text-emerald-400",children:c(t.projected_roi.monthlyBenefit)})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground block text-xs",children:"Annual Benefit"}),e.jsx("span",{className:"font-medium text-emerald-400",children:c(t.projected_roi.annualBenefit)})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground block text-xs",children:"Payback"}),e.jsxs("span",{className:"font-medium",children:[t.projected_roi.paybackMonths," months"]})]})]})]}),t.deliverables?.length?e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wide mb-2",children:"Deliverables"}),e.jsx("ul",{className:"text-sm space-y-1",children:t.deliverables.map((s,a)=>e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"text-emerald-400 mt-0.5",children:"✓"})," ",s]},a))})]}):null,e.jsxs("div",{className:"text-xs text-muted-foreground pt-2 border-t border-border",children:["Quote ID: ",e.jsx("code",{className:"text-foreground/60",children:t.id})]})]})]})})]})};export{We 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.