1import{a as i,j as e}from"./vendor-react-Bz_ZsvSD.js";import{u,L as v}from"./vendor-wouter-B0CVBZTb.js";import{P as j}from"./PortalCard-DwXqUsTw.js";import{P as N}from"./PageHeader-DVpTR6Gc.js";import{B as b}from"./button-CjzOfrkz.js";import{I as n}from"./input-Cd4jSc8k.js";import{L as r}from"./label-CuGIYSbR.js";import{T as x}from"./textarea-DO5P6xBg.js";import{S as C,a as k,b as z,c as I,d as p}from"./select-DscTKAVq.js";import{c as w}from"./prospectApi-D4A8U2bY.js";import{C as S}from"./chevron-left-AMps4Lo9.js";import"./index-CnUkSChN.js";import"./vendor-framer-Be2PyxnT.js";import"./vendor-radix-CWyxWYha.js";import"./check-O8WqXZMB.js";function $(){const[,h]=u(),[o,c]=i.useState(!1),[d,m]=i.useState(null),[s,t]=i.useState({linkedinUrl:"",profileDump:"",profileImageUrl:"",domain:"",notes:"",videoSrc:"",senderId:"mantas",maxCredits:5,contentVersion:"v1"});async function g(a){a.preventDefault(),m(null),c(!0);try{const l=await w({linkedinUrl:s.linkedinUrl,profileDump:s.profileDump||void 0,profileImageUrl:s.profileImageUrl||void 0,domain:s.domain,notes:s.notes||void 0,videoSrc:s.videoSrc||void 0,senderId:s.senderId,maxCredits:s.maxCredits,contentVersion:s.contentVersion});h(`/hq/agents/prospect-pages/${l.id}`)}catch(l){m(l instanceof Error?l.message:"Failed to create prospect page"),c(!1)}}return e.jsxs("div",{className:"max-w-4xl mx-auto px-6 md:px-10 py-8 flex flex-col gap-8",children:[e.jsx("div",{className:"flex items-center gap-4 text-sm",children:e.jsxs(v,{href:"/hq/agents/prospect-pages",className:"text-zinc-500 hover:text-zinc-900 inline-flex items-center gap-1",children:[e.jsx(S,{className:"h-4 w-4"})," Back to pages"]})}),e.jsx(N,{title:"New Prospect Page",description:"Generate a bespoke 1:1 business case."}),e.jsx(j,{className:"p-6",children:e.jsxs("form",{onSubmit:g,className:"flex flex-col gap-6",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(r,{htmlFor:"linkedinUrl",className:"text-xs text-zinc-500",children:"LinkedIn URL"}),e.jsx(n,{required:!0,id:"linkedinUrl",value:s.linkedinUrl,onChange:a=>t({...s,linkedinUrl:a.target.value}),placeholder:"https://linkedin.com/in/..."})]}),e.jsxs("fieldset",{className:"flex flex-col gap-2 md:col-span-2","aria-describedby":"content-version-description",children:[e.jsx("legend",{className:"text-xs text-zinc-500",children:"Content version"}),e.jsx("p",{id:"content-version-description",className:"text-xs text-zinc-500",children:"Choose one template for this page. The selection stays with the page when you regenerate it."}),e.jsx("div",{className:"grid gap-3 sm:grid-cols-2",children:[["v1","V1 â current business case","The existing seven-section business case and five-year model."],["v2","V2 â five-section brief","Executive summary, workflows, agent setup, illustrative ACV scenarios, and a two-week trial close."]].map(([a,l,f])=>e.jsxs("label",{className:`cursor-pointer rounded-md border p-4 transition-colors ${s.contentVersion===a?"border-zinc-900 bg-zinc-50":"border-zinc-200 hover:border-zinc-400"}`,children:[e.jsx("input",{type:"radio",name:"contentVersion",value:a,checked:s.contentVersion===a,onChange:()=>t({...s,contentVersion:a}),className:"sr-only"}),e.jsx("span",{className:"block text-sm font-medium text-zinc-900",children:l}),e.jsx("span",{className:"mt-1 block text-xs leading-5 text-zinc-500",children:f})]},a))})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(r,{htmlFor:"profileImageUrl",className:"text-xs text-zinc-500",children:"Profile Image URL (optional)"}),e.jsx(n,{id:"profileImageUrl",type:"url",value:s.profileImageUrl,onChange:a=>t({...s,profileImageUrl:a.target.value}),placeholder:"https://media.licdn.com/â¦"})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(r,{htmlFor:"domain",className:"text-xs text-zinc-500",children:"Company Domain"}),e.jsx(n,{required:!0,id:"domain",value:s.domain,onChange:a=>t({...s,domain:a.target.value}),placeholder:"acme.com"})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(r,{htmlFor:"senderId",className:"text-xs text-zinc-500",children:"Sender"}),e.jsxs(C,{value:s.senderId,onValueChange:a=>t({...s,senderId:a}),children:[e.jsx(k,{id:"senderId",children:e.jsx(z,{})}),e.jsxs(I,{children:[e.jsx(p,{value:"mantas",children:"Mantas Aleksiejevas"}),e.jsx(p,{value:"kae",children:"Kae Hum"})]})]})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(r,{htmlFor:"videoSrc",className:"text-xs text-zinc-500",children:"Additional Loom or Tella URL (optional)"}),e.jsx(n,{id:"videoSrc",type:"url",value:s.videoSrc,onChange:a=>t({...s,videoSrc:a.target.value}),placeholder:"https://www.tella.tv/video/vid_.../embed"})]}),e.jsxs("div",{className:"flex flex-col gap-2 md:col-span-2",children:[e.jsx(r,{htmlFor:"profileDump",className:"text-xs text-zinc-500",children:"LinkedIn profile dump (optional fallback)"}),e.jsx(x,{id:"profileDump",value:s.profileDump,maxLength:2e4,onChange:a=>t({...s,profileDump:a.target.value}),placeholder:"Paste plain-text profile content only if Leadsforge cannot establish the recipient's name, role, and company.",rows:3})]}),e.jsxs("div",{className:"flex flex-col gap-2 md:col-span-2",children:[e.jsx(r,{htmlFor:"notes",className:"text-xs text-zinc-500",children:"Notes (optional)"}),e.jsx(x,{id:"notes",value:s.notes,onChange:a=>t({...s,notes:a.target.value}),placeholder:"Extra context for the agent...",rows:2})]})]}),e.jsxs("div",{className:"flex items-center gap-4 bg-zinc-50 border border-zinc-200 p-4 rounded-md",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(r,{htmlFor:"maxCredits",className:"text-xs text-zinc-600",children:"Leadsforge credits cap:"}),e.jsx(n,{id:"maxCredits",type:"number",min:1,max:10,value:s.maxCredits,onChange:a=>t({...s,maxCredits:parseInt(a.target.value)||5}),className:"w-20 h-8 text-sm"})]}),e.jsx("div",{className:"flex-1"}),d&&e.jsx("span",{className:"text-sm text-red-600",children:d}),e.jsx(b,{type:"submit",disabled:o,className:"bg-black text-white hover:bg-zinc-800 rounded-[5px]",children:o?"Generating...":"Generate Page"})]})]})})]})}export{$ 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.