import{j as e}from"./ui-vendor-Dyu0xMC9.js";import{j as s,r as a,L as t}from"./react-vendor-BiKEbLqf.js";import{H as i,M as r,F as l}from"./Footer-BCdrvFQr.js";import{H as n,B as d}from"./button-F0c2zgfO.js";import{C as c,a as o,b as m,c as x,d as u}from"./card-D8XUAx1y.js";import{L as h,I as j}from"./client-Ccea0ZZ8.js";import{S as v}from"./slider-DpkpY2uB.js";import{A as p,a as f,b as N,c as g}from"./accordion-DK3ZPWHL.js";import{B as b,a as y,b as w,c as C,d as M,e as S}from"./breadcrumb-BZGpceck.js";import{r as k,s as $}from"./index-D2mkZfe8.js";import{D as F}from"./download-DlY6qDWe.js";import{a as R}from"./chevron-right-9d459eh4.js";import"./chart-vendor-V3pFlbOw.js";import"./index-D9xaiIhE.js";const L=()=>{const[L]=s(),[B,A]=a.useState(L.get("usecase")||"alpr"),[I,P]=a.useState(5e3),[E,H]=a.useState(15),[O,V]=a.useState(50),[U,Y]=a.useState(5),[_,D]=a.useState(45),[z,T]=a.useState(75e3),[q,G]=a.useState(3e3),[J,K]=a.useState("expected"),Q={alpr:"ALPR",ppe:"PPE Compliance",occupancy:"Occupancy Monitoring"},W=a.useMemo(()=>{const e=I*(E/100)*12*O,s=12*I*U/60*_,a=(e+s)*("conservative"===J?.7:"expected"===J?1:1.3),t=z+12*q,i=(a-t)/t*100,r=a-t,l=z/Math.max((a-12*q)/12,1);return{paybackMonths:Math.max(l,0),netBenefit:r,roi:i,benefits:a,costs:t,revenueUplift:e,reviewerCost:s}},[I,E,O,U,_,z,q,J,B]);a.useEffect(()=>{I>0&&E>0&&k({scenario:"cv",roi_pct:Math.round(100*W.roi)/100,payback_months:Math.round(10*W.paybackMonths)/10,npv_3yr:Math.round(W.netBenefit)})},[W.roi,W.paybackMonths,W.netBenefit,I,E]);return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsxs(n,{children:[e.jsx("title",{children:"Computer Vision ROI Calculator | Allerin"}),e.jsx("meta",{name:"description",content:"Calculate Year-1 ROI and payback for computer vision projects including ALPR, PPE compliance, and occupancy monitoring."})]}),e.jsx(i,{}),e.jsx("main",{className:"py-8 md:py-12",children:e.jsxs("div",{className:"container max-w-6xl",children:[e.jsx(b,{className:"mb-6",children:e.jsxs(y,{children:[e.jsx(w,{children:e.jsx(C,{asChild:!0,children:e.jsx(t,{to:"/",children:"Home"})})}),e.jsx(M,{}),e.jsx(w,{children:e.jsx(C,{asChild:!0,children:e.jsx(t,{to:"/roi-calculator",children:"ROI Calculator"})})}),e.jsx(M,{}),e.jsx(S,{children:"Computer Vision"})]})}),e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-3xl md:text-4xl font-bold mb-2",children:"Computer Vision ROI Estimate"}),e.jsx("p",{className:"text-muted-foreground",children:"Calculate revenue uplift and operational savings from vision AI."})]}),e.jsxs("div",{className:"grid lg:grid-cols-2 gap-8",children:[e.jsxs(c,{children:[e.jsxs(o,{children:[e.jsx(m,{children:"Your Inputs"}),e.jsx(x,{children:"Adjust values to match your environment"})]}),e.jsxs(u,{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{children:"Use Case"}),e.jsx("div",{className:"flex gap-2",children:Object.entries(Q).map(([s,a])=>e.jsx(d,{variant:B===s?"default":"outline",size:"sm",onClick:()=>A(s),className:"flex-1",children:a},s))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"events",children:"Baseline events per month"}),e.jsx(j,{id:"events",type:"number",value:I,onChange:e=>P(Number(e.target.value))}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Citations, inspections, or detections"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs(h,{htmlFor:"uplift",children:["Uplift (%): ",E]}),e.jsx(v,{id:"uplift",min:0,max:50,step:5,value:[E],onValueChange:e=>H(e[0])})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"value",children:"Avg value per event ($)"}),e.jsx(j,{id:"value",type:"number",value:O,onChange:e=>V(Number(e.target.value))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"reviewer",children:"Reviewer minutes per event"}),e.jsx(j,{id:"reviewer",type:"number",value:U,onChange:e=>Y(Number(e.target.value))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"hourly",children:"Hourly rate ($)"}),e.jsx(j,{id:"hourly",type:"number",value:_,onChange:e=>D(Number(e.target.value))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"hardware",children:"Hardware + install (one-time, $)"}),e.jsx(j,{id:"hardware",type:"number",value:z,onChange:e=>T(Number(e.target.value))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"software",children:"Software + ops per month ($)"}),e.jsx(j,{id:"software",type:"number",value:q,onChange:e=>G(Number(e.target.value))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{children:"Confidence level"}),e.jsx("div",{className:"flex gap-2",children:[{value:"conservative",label:"Conservative (0.7×)"},{value:"expected",label:"Expected (1.0×)"},{value:"aggressive",label:"Aggressive (1.3×)"}].map(s=>e.jsx(d,{variant:J===s.value?"default":"outline",size:"sm",onClick:()=>K(s.value),className:"flex-1",children:s.label.split(" ")[0]},s.value))}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Conservative = 0.7×, Expected = 1.0×, Aggressive = 1.3× applied to benefits only."})]})]})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs(c,{children:[e.jsx(o,{children:e.jsx(m,{children:"Year-1 Results"})}),e.jsxs(u,{className:"space-y-6",role:"region","aria-live":"polite",children:[e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-sm text-muted-foreground mb-1",children:"Payback"}),e.jsxs("div",{className:"text-2xl font-bold",children:[W.paybackMonths.toFixed(1)," mo"]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm text-muted-foreground mb-1",children:"Net Benefit"}),e.jsxs("div",{className:"text-2xl font-bold",children:["$",Math.round(W.netBenefit).toLocaleString()]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm text-muted-foreground mb-1",children:"ROI"}),e.jsxs("div",{className:"text-2xl font-bold",children:[W.roi.toFixed(0),"%"]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-sm font-medium",children:"Costs vs Benefits (Year-1)"}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-20 text-xs text-muted-foreground",children:"Costs"}),e.jsxs("div",{className:"flex-1 h-8 bg-destructive/20 rounded relative overflow-hidden",children:[e.jsx("div",{className:"h-full bg-destructive transition-all",style:{width:W.costs/Math.max(W.benefits,W.costs)*100+"%"}}),e.jsxs("span",{className:"absolute inset-0 flex items-center px-2 text-xs font-medium",children:["$",Math.round(W.costs).toLocaleString()]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-20 text-xs text-muted-foreground",children:"Benefits"}),e.jsxs("div",{className:"flex-1 h-8 bg-primary/20 rounded relative overflow-hidden",children:[e.jsx("div",{className:"h-full bg-primary transition-all",style:{width:W.benefits/Math.max(W.benefits,W.costs)*100+"%"}}),e.jsxs("span",{className:"absolute inset-0 flex items-center px-2 text-xs font-medium",children:["$",Math.round(W.benefits).toLocaleString()]})]})]})]})]})]})]}),e.jsxs(c,{children:[e.jsx(o,{children:e.jsx(m,{children:"Actions"})}),e.jsxs(u,{className:"flex flex-col gap-3",children:[e.jsxs(d,{onClick:()=>{alert("PDF download would trigger here with assumptions + results")},className:"w-full justify-start",children:[e.jsx(F,{className:"mr-2 h-4 w-4"}),"Download PDF"]}),e.jsxs(d,{onClick:()=>{alert("Email form would open here")},variant:"outline",className:"w-full justify-start",children:[e.jsx(r,{className:"mr-2 h-4 w-4"}),"Email me this"]}),e.jsxs(d,{onClick:()=>{$({scenario:"cv",roi_pct:Math.round(100*W.roi)/100,payback_months:Math.round(10*W.paybackMonths)/10}),window.location.href=`mailto:contact@allerin.com?subject=ROI Consult: Computer Vision (${Q[B]})`},variant:"outline",className:"w-full justify-start",children:[e.jsx(R,{className:"mr-2 h-4 w-4"}),"Book 30-min consult"]})]})]}),e.jsx(p,{type:"single",collapsible:!0,children:e.jsxs(f,{value:"assumptions",children:[e.jsx(N,{children:"View all assumptions"}),e.jsx(g,{className:"space-y-2 text-sm",children:e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsx("div",{className:"text-muted-foreground",children:"Use case:"}),e.jsx("div",{className:"font-medium",children:Q[B]}),e.jsx("div",{className:"text-muted-foreground",children:"Events/month:"}),e.jsx("div",{className:"font-medium",children:I.toLocaleString()}),e.jsx("div",{className:"text-muted-foreground",children:"Uplift:"}),e.jsxs("div",{className:"font-medium",children:[E,"%"]}),e.jsx("div",{className:"text-muted-foreground",children:"Value/event:"}),e.jsxs("div",{className:"font-medium",children:["$",O]}),e.jsx("div",{className:"text-muted-foreground",children:"Revenue uplift (Y1):"}),e.jsxs("div",{className:"font-medium",children:["$",Math.round(W.revenueUplift).toLocaleString()]}),e.jsx("div",{className:"text-muted-foreground",children:"Reviewer min/event:"}),e.jsx("div",{className:"font-medium",children:U}),e.jsx("div",{className:"text-muted-foreground",children:"Hourly rate:"}),e.jsxs("div",{className:"font-medium",children:["$",_]}),e.jsx("div",{className:"text-muted-foreground",children:"Reviewer savings (Y1):"}),e.jsxs("div",{className:"font-medium",children:["$",Math.round(W.reviewerCost).toLocaleString()]}),e.jsx("div",{className:"text-muted-foreground",children:"Hardware+install:"}),e.jsxs("div",{className:"font-medium",children:["$",z.toLocaleString()]}),e.jsx("div",{className:"text-muted-foreground",children:"Software/mo:"}),e.jsxs("div",{className:"font-medium",children:["$",q.toLocaleString()]}),e.jsx("div",{className:"text-muted-foreground",children:"Confidence:"}),e.jsx("div",{className:"font-medium capitalize",children:J})]})})]})}),e.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"This is an estimate based on provided inputs and industry heuristics. It is not financial advice."})]})]})]})}),e.jsx(l,{})]})};export{L as default};