1import{v as o,j as t,J as a}from"./vendor-DGvMVYXi.js";import{B as i}from"./badge-COnvzEf9.js";import{H as l,J as d,K as g,M as c}from"./index-CPX2cHFp.js";const u=3;function p({campaignId:r}){const{data:e}=o({queryKey:["/api/campaigns",r,"overlength-stats"],queryFn:async()=>{const n=await fetch(`/api/campaigns/${r}/overlength-stats`,{credentials:"include"});return n.ok?n.json():null},staleTime:3e5});if(!e||e.eventCount<u)return null;const s=e.avgWordCount-e.avgWordMax;return t.jsx(l,{children:t.jsxs(d,{children:[t.jsx(g,{asChild:!0,children:t.jsxs(i,{className:"bg-orange-500 hover:bg-orange-600 text-white text-xs flex items-center gap-1 cursor-default",children:[t.jsx(a,{className:"w-3 h-3"}),e.eventCount," over-length"]})}),t.jsx(c,{side:"top",className:"max-w-xs text-xs",children:t.jsxs("p",{children:[t.jsx("strong",{children:e.eventCount})," follow-up email",e.eventCount!==1?"s":""," exceeded the word limit in the last ",e.windowDays," days (avg ",e.avgWordMax," word cap, avg"," ",e.avgWordCount," words generated",s>0?` â ${s} over`:"","). The AI model may need prompt tuning for this campaign."]})})]})})}export{p as OverlengthWarningBadge};
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.