import{t as e}from"./jsx-runtime-B6e-FjZo.js";import{t}from"./utils-imN4rRV9.js";import{Ar as n}from"./app-figJB8d1.js";var r=n(),i=e();function a(e,t){return t===`low`||t===`medium`||t===`high`?t:e>=70?`high`:e>=40?`medium`:`low`}var o={high:`border-emerald-300 bg-emerald-50 text-emerald-900 dark:border-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-200`,medium:`border-amber-300 bg-amber-50 text-amber-900 dark:border-amber-700 dark:bg-amber-900/30 dark:text-amber-200`,low:`border-slate-300 bg-slate-50 text-slate-700 dark:border-slate-700 dark:bg-slate-900/30 dark:text-slate-300`},s={high:`Hot`,medium:`Warm`,low:`Cold`};function c(e){let n=(0,r.c)(23),{score:c,bucket:l,reasons:u,showNumber:d,className:f}=e,p=d===void 0?!0:d,m;n[0]===c?m=n[1]:(m=Math.round(c),n[0]=c,n[1]=m);let h=Math.max(0,Math.min(100,m)),g=a(h,l),_=`Lead score ${h}/100 — ${s[g]}`,v;n[2]!==u||n[3]!==_?(v=[_],Array.isArray(u)&&u.length>0&&v.push(``,...u),n[2]=u,n[3]=_,n[4]=v):v=n[4];let y=o[g],b;n[5]!==f||n[6]!==y?(b=t(`inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium tabular-nums`,y,f),n[5]=f,n[6]=y,n[7]=b):b=n[7];let x=v.join(`
`),S=g===`high`?`bg-emerald-500`:g===`medium`?`bg-amber-500`:`bg-slate-400`,C;n[8]===S?C=n[9]:(C=t(`size-1.5 rounded-full`,S),n[8]=S,n[9]=C);let w;n[10]===C?w=n[11]:(w=(0,i.jsx)(`span`,{"aria-hidden":`true`,className:C}),n[10]=C,n[11]=w);let T=s[g],E;n[12]===T?E=n[13]:(E=(0,i.jsx)(`span`,{children:T}),n[12]=T,n[13]=E);let D;n[14]!==h||n[15]!==p?(D=p&&(0,i.jsxs)(`span`,{className:`opacity-70`,children:[`· `,h]}),n[14]=h,n[15]=p,n[16]=D):D=n[16];let O;return n[17]!==E||n[18]!==D||n[19]!==b||n[20]!==x||n[21]!==w?(O=(0,i.jsxs)(`span`,{className:b,title:x,children:[w,E,D]}),n[17]=E,n[18]=D,n[19]=b,n[20]=x,n[21]=w,n[22]=O):O=n[22],O}export{c as t};