PageSourceSearch

https://careerfy.ai/assets/OutreachPage-De-RC0du.js

js careerfy.ai collected 2026-10-05 14:04:05 UTC 22,600 bytes, 4 lines download raw bytes

1import{j as e}from"./ui-vendor-BwoIqzLn.js";import{r as h}from"./react-vendor-DPYsfZSs.js";import{u as R,L as ce}from"./JobHunt-CugHLpDR.js";import{P as te,E as H}from"./EmptyState-OzW9lZuN.js";import{C as G,a as I,B as D,b as de,c as oe}from"./badge-By2rzf_D.js";import{o as le,a4 as P,a7 as me,B as u,q as M,K as xe,M as he,N as ue,O as V,J as E,D as z,b as J,d as $,e as B,a8 as pe,a as U,z as ne,C as je,s as ie,n as re,U as fe,a9 as ge,a1 as Ne}from"./index-Cho2j8u4.js";import{C as y}from"./jobPostings-B3wfTT1L.js";import{E as ve,c as we}from"./job-hunt-RLg27_RY.js";import{f as q,a as ye}from"./formatDistanceToNow-yQCULYx3.js";import{b as _e}from"./forms-BtcND4Ku.js";import{t as be,L as p}from"./zod-BIgaF96R.js";import{I as F}from"./index-B9FHmg5I.js";import{T as Ce}from"./textarea-VkG2Gckx.js";import{P as Se,a as De,b as Ee,C as ke}from"./calendar-BoEJrK69.js";import{f as Te}from"./format-Bq9rd9AW.js";import{S as K,a as W,b as X,c as Y,d as w}from"./select-6jHnVvzb.js";import{C as Fe}from"./copy-BECJ6Ecr.js";import{S as L}from"./separator-Dq97cQ-j.js";import{E as Ge}from"./eye-DG8Ntw8X.js";import{T as Ie,a as Pe,b as Q,c as Z}from"./tabs-8ZyWhgoy.js";import{S as Ae}from"./send-BgEUCoSL.js";import"./PremiumFeatureDialog-DIWfE_vK.js";import"./progress-CEk5bIKP.js";import"./upload-sVtEwrnB.js";import"./pdf-E-z4Fnnc.js";import"./lock-baX8HOcv.js";import"./crown-CA6kVlJu.js";import"./CoverLetterProcessSection-Dqg1o3oD.js";import"./TestimonialsSection-DpgqfVV5.js";import"./alert-BM-YJhcO.js";import"./ui-utils-ChIJ2jse.js";import"./circle-check-DMvTR9zj.js";import"./circle-alert-nCEvJT5n.js";import"./checkbox-DexKw7TT.js";import"./state-management-DuowQsgv.js";import"./en-US-BSuKQmhS.js";import"./chevron-left-CXRXESvU.js";import"./index-CTHujt79.js";import"./chevron-up-DAmdxplk.js";function ee({contact:s,onEdit:n,onGenerateEmail:a}){const{deleteContact:d}=R(),i=async()=>{if(confirm("Are you sure you want to delete this contact?"))try{await d(s.id),E.success("Contact deleted")}catch{E.error("Failed to delete contact")}},r=s.next_followup_date&&new Date(s.next_followup_date)<=new Date;return e.jsx(G,{className:r?"border-primary":"",children:e.jsx(I,{className:"p-6",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 space-y-3",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h3",{className:"font-semibold text-lg",children:s.contact_name}),s.source&&s.source!=="manual"&&e.jsxs(D,{variant:"outline",className:"text-xs",children:[s.source==="perplexity"&&"🔍 Perplexity",s.source==="apollo"&&"🚀 Apollo",s.source==="hybrid"&&"⚡ Hybrid"]})]}),s.contact_title&&e.jsx("p",{className:"text-sm text-muted-foreground",children:s.contact_title}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground mt-1",children:[e.jsx(le,{className:"h-4 w-4"}),e.jsx("span",{children:s.company_name})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-3 text-sm",children:[s.contact_email&&e.jsxs("a",{href:`mailto:${s.contact_email}`,className:"flex items-center gap-1 text-primary hover:underline",children:[e.jsx(P,{className:"h-3 w-3"}),s.contact_email]}),s.contact_linkedin&&e.jsxs("a",{href:s.contact_linkedin,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-primary hover:underline",children:[e.jsx(me,{className:"h-3 w-3"}),"LinkedIn"]})]}),s.tags.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2",children:s.tags.map(o=>e.jsx(D,{variant:"outline",children:o},o))}),s.relationship_notes&&e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:s.relationship_notes}),e.jsxs("div",{className:"flex flex-wrap gap-4 text-xs text-muted-foreground pt-2",children:[s.last_contact_date&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(y,{className:"h-3 w-3"}),e.jsxs("span",{children:["Last contact ",q(new Date(s.last_contact_date),new Date,{addSuffix:!0})]})]}),s.next_followup_date&&e.jsxs("div",{className:`flex items-center gap-1 ${r?"text-primary font-medium":""}`,children:[e.jsx(y,{className:"h-3 w-3"}),e.jsx("span",{children:r?"Follow-up due!":`Follow-up ${q(new Date(s.next_followup_date),new Date,{addSuffix:!0})}`})]})]})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs(u,{onClick:a,size:"sm",className:"w-full",children:[e.jsx(M,{className:"h-3 w-3 mr-2"}),"Generate Email"]}),e.jsxs(xe,{children:[e.jsx(he,{asChild:!0,children:e.jsx(u,{variant:"outline",size:"icon",children:e.jsx(ve,{className:"h-4 w-4"})})}),e.jsxs(ue,{align:"end",children:[e.jsx(V,{onClick:n,children:"Edit"}),e.jsx(V,{onClick:i,className:"text-destructive",children:"Delete"})]})]})]})]})})})}function O({open:s,onOpenChange:n,contact:a,onSuccess:d}){const{createContact:i,updateContact:r}=R(),[o,_]=h.useState(!1),[j,b]=h.useState(""),{register:m,handleSubmit:x,setValue:f,watch:k,formState:{errors:c},reset:T}=_e({resolver:be(we),defaultValues:a?{company_name:a.company_name,contact_name:a.contact_name,contact_title:a.contact_title||"",contact_email:a.contact_email||"",contact_linkedin:a.contact_linkedin||"",relationship_notes:a.relationship_notes||"",tags:a.tags,next_followup_date:a.next_followup_date?new Date(a.next_followup_date):void 0}:{tags:[]}}),v=k("tags")||[],C=k("next_followup_date"),g=()=>{j.trim()&&!v.includes(j.trim())&&(f("tags",[...v,j.trim()]),b(""))},N=l=>{f("tags",v.filter(S=>S!==l))},t=async l=>{_(!0);try{const S={...l,contact_title:l.contact_title||void 0,contact_email:l.contact_email||void 0,contact_linkedin:l.contact_linkedin||void 0,relationship_notes:l.relationship_notes||void 0,next_followup_date:l.next_followup_date?.toISOString()||void 0};a?(await r(a.id,S),E.success("Contact updated successfully")):(await i(S),E.success("Contact added successfully")),T(),n(!1),d?.()}catch(S){E.error(S.message||"Failed to save contact")}finally{_(!1)}};return e.jsx(z,{open:s,onOpenChange:n,children:e.jsxs(J,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[e.jsx($,{children:e.jsx(B,{children:a?"Edit Contact":"Add New Contact"})}),e.jsxs("form",{onSubmit:x(t),className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{children:"Contact Name *"}),e.jsx(F,{...m("contact_name"),placeholder:"John Doe"}),c.contact_name&&e.jsx("p",{className:"text-sm text-destructive",children:c.contact_name.message})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{children:"Company Name *"}),e.jsx(F,{...m("company_name"),placeholder:"Tech Corp"}),c.company_name&&e.jsx("p",{className:"text-sm text-destructive",children:c.company_name.message})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{children:"Job Title"}),e.jsx(F,{...m("contact_title"),placeholder:"HR Manager"}),c.contact_title&&e.jsx("p",{className:"text-sm text-destructive",children:c.contact_title.message})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{children:"Email"}),e.jsx(F,{...m("contact_email"),type:"email",placeholder:"[email protected]"}),c.contact_email&&e.jsx("p",{className:"text-sm text-destructive",children:c.contact_email.message})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{children:"LinkedIn"}),e.jsx(F,{...m("contact_linkedin"),type:"url",placeholder:"https://linkedin.com/in/..."}),c.contact_linkedin&&e.jsx("p",{className:"text-sm text-destructive",children:c.contact_linkedin.message})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{children:"Tags"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(F,{value:j,onChange:l=>b(l.target.value),onKeyDown:l=>{l.key==="Enter"&&(l.preventDefault(),g())},placeholder:"e.g., Recruiter, Hiring Manager"}),e.jsx(u,{type:"button",onClick:g,variant:"outline",size:"icon",children:e.jsx(te,{className:"h-4 w-4"})})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:v.map(l=>e.jsxs(D,{variant:"secondary",className:"gap-1",children:[l,e.jsx("button",{type:"button",onClick:()=>N(l),children:e.jsx(pe,{className:"h-3 w-3"})})]},l))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{children:"Next Follow-up Date"}),e.jsxs(Se,{children:[e.jsx(De,{asChild:!0,children:e.jsxs(u,{variant:"outline",className:U("w-full justify-start text-left font-normal",!C&&"text-muted-foreground"),children:[e.jsx(y,{className:"mr-2 h-4 w-4"}),C?Te(C,"PPP"):"Pick a date"]})}),e.jsx(Ee,{className:"w-auto p-0",align:"start",children:e.jsx(ke,{mode:"single",selected:C||void 0,onSelect:l=>f("next_followup_date",l||null),initialFocus:!0,className:U("p-3 pointer-events-auto")})})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{children:"Relationship Notes"}),e.jsx(Ce,{...m("relationship_notes"),placeholder:"How you know this person, context of conversations...",rows:4}),c.relationship_notes&&e.jsx("p",{className:"text-sm text-destructive",children:c.relationship_notes.message})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[e.jsx(u,{type:"button",variant:"outline",onClick:()=>n(!1),children:"Cancel"}),e.jsxs(u,{type:"submit",disabled:o,children:[o&&e.jsx(ne,{className:"mr-2 h-4 w-4 animate-spin"}),a?"Update Contact":"Add Contact"]})]})]})]})})}function Le({open:s,onOpenChange:n,contactId:a,jobListingId:d,onEmailGenerated:i}){const[r,o]=h.useState("introduction"),[_,j]=h.useState("professional"),[b,m]=h.useState(!1),[x,f]=h.useState(null),[k,c]=h.useState(!1),T=async()=>{m(!0);try{const{data:g,error:N}=await ie.functions.invoke("jh_generate_outreach_email",{body:{contactId:a,jobListingId:d,purpose:r,tone:_}});if(N)throw N;f({subject:g.subject,body:g.body}),E.success("Email generated successfully")}catch(g){console.error("Error generating email:",g),E.error(g.message||"Failed to generate email")}finally{m(!1)}},v=async()=>{x&&(await navigator.clipboard.writeText(`Subject: ${x.subject}
2
3${x.body}
3`),c(!0),setTimeout(()=>c(!1),2e3),E.success("Copied to clipboard"))},C=()=>{x&&(i(x.subject,x.body),n(!1),f(null))};return e.jsx(z,{open:s,onOpenChange:n,children:e.jsxs(J,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[e.jsx($,{children:e.jsxs(B,{className:"flex items-center gap-2",children:[e.jsx(M,{className:"h-5 w-5 text-primary"}),"AI Email Generator"]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(p,{children:"Email Purpose"}),e.jsxs(K,{value:r,onValueChange:o,children:[e.jsx(W,{children:e.jsx(X,{})}),e.jsxs(Y,{children:[e.jsx(w,{value:"introduction",children:"Introduction"}),e.jsx(w,{value:"follow-up",children:"Follow-up"}),e.jsx(w,{value:"application",children:"Job Application"}),e.jsx(w,{value:"networking",children:"Networking"}),e.jsx(w,{value:"referral",children:"Referral Request"})]})]})]}),e.jsxs("div",{children:[e.jsx(p,{children:"Tone"}),e.jsxs(K,{value:_,onValueChange:j,children:[e.jsx(W,{children:e.jsx(X,{})}),e.jsxs(Y,{children:[e.jsx(w,{value:"professional",children:"Professional"}),e.jsx(w,{value:"friendly",children:"Friendly"}),e.jsx(w,{value:"formal",children:"Formal"}),e.jsx(w,{value:"casual",children:"Casual"})]})]})]}),x?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(p,{children:"Subject"}),e.jsx("div",{className:"p-3 bg-muted rounded-lg mt-2",children:e.jsx("p",{className:"font-medium",children:x.subject})})]}),e.jsxs("div",{children:[e.jsx(p,{children:"Body"}),e.jsx("div",{className:"p-3 bg-muted rounded-lg mt-2 whitespace-pre-wrap",children:x.body})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(u,{onClick:v,variant:"outline",className:"flex-1",children:k?e.jsxs(e.Fragment,{children:[e.jsx(je,{className:"mr-2 h-4 w-4"}),"Copied"]}):e.jsxs(e.Fragment,{children:[e.jsx(Fe,{className:"mr-2 h-4 w-4"}),"Copy"]})}),e.jsx(u,{onClick:C,className:"flex-1",children:"Use This Email"})]}),e.jsx(u,{onClick:()=>f(null),variant:"ghost",className:"w-full",children:"Generate New Email"})]}):e.jsx(u,{onClick:T,disabled:b,className:"w-full",children:b?e.jsxs(e.Fragment,{children:[e.jsx(ne,{className:"mr-2 h-4 w-4 animate-spin"}),"Generating..."]}):e.jsxs(e.Fragment,{children:[e.jsx(M,{className:"mr-2 h-4 w-4"}),"Generate Email"]})})]})]})})}const se={draft:{label:"Draft",variant:"secondary"},scheduled:{label:"Scheduled",variant:"default"},sent:{label:"Sent",variant:"outline"}};function Oe({open:s,onOpenChange:n,email:a,jobListing:d,contact:i}){const r=se[a.status]||se.draft;return e.jsx(z,{open:s,onOpenChange:n,children:e.jsxs(J,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[e.jsx($,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(P,{className:"h-5 w-5 text-muted-foreground"}),e.jsx(B,{className:"text-header font-semantic-bold",children:"Email Details"})]})}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(D,{variant:r.variant,children:r.label}),e.jsx(D,{variant:"outline",children:a.purpose}),e.jsxs(D,{variant:"outline",children:["Tone: ",a.tone]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-title font-semantic-semibold mb-2",children:"Subject"}),e.jsx("p",{className:"text-body",children:a.subject})]}),e.jsx(L,{}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-title font-semantic-semibold mb-2",children:"Message"}),e.jsx("div",{className:"text-body whitespace-pre-wrap bg-muted/50 p-4 rounded-lg",children:a.body})]}),e.jsx(L,{}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-title font-semantic-semibold",children:"Associated With"}),d&&e.jsxs("div",{className:"flex items-start gap-3 p-3 bg-muted/50 rounded-lg",children:[e.jsx(re,{className:"h-4 w-4 text-muted-foreground mt-1"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-body font-medium",children:d.title}),e.jsxs("p",{className:"text-fine text-muted-foreground",children:[d.company_name," • ",d.location||"Remote"]})]})]}),i&&e.jsxs("div",{className:"flex items-start gap-3 p-3 bg-muted/50 rounded-lg",children:[e.jsx(fe,{className:"h-4 w-4 text-muted-foreground mt-1"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-body font-medium",children:i.contact_name}),e.jsxs("p",{className:"text-fine text-muted-foreground",children:[i.contact_title&&`${i.contact_title} • `,i.company_name]}),i.contact_email&&e.jsx("p",{className:"text-fine text-muted-foreground",children:i.contact_email})]})]})]}),e.jsx(L,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-title font-semantic-semibold",children:"Timeline"}),e.jsxs("div",{className:"space-y-2 text-fine text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(y,{className:"h-3 w-3"}),e.jsxs("span",{children:["Created: ",new Date(a.created_at).toLocaleStr
3ing()]})]}),a.scheduled_date&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(y,{className:"h-3 w-3"}),e.jsxs("span",{children:["Scheduled: ",new Date(a.scheduled_date).toLocaleString()]})]}),a.sent_date&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(y,{className:"h-3 w-3"}),e.jsxs("span",{children:["Sent: ",new Date(a.sent_date).toLocaleString()]})]}),a.reply_received_date&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(y,{className:"h-3 w-3"}),e.jsxs("span",{children:["Reply Received: ",new Date(a.reply_received_date).toLocaleString()]})]})]})]})]})]})})}const ae={draft:{label:"Draft",variant:"secondary"},scheduled:{label:"Scheduled",variant:"default"},sent:{label:"Sent",variant:"outline"}};function Me({email:s,jobListing:n,contact:a,onDelete:d}){const[i,r]=h.useState(!1),o=ae[s.status]||ae.draft;return e.jsxs(e.Fragment,{children:[e.jsxs(G,{children:[e.jsx(de,{className:"pb-3",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(P,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),e.jsx(oe,{className:"text-title font-semantic-semibold truncate",children:s.subject})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(D,{variant:o.variant,children:o.label}),e.jsx(D,{variant:"outline",className:"gap-1",children:e.jsx("span",{className:"text-fine",children:s.purpose})})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(u,{variant:"ghost",size:"sm",onClick:()=>r(!0),children:e.jsx(Ge,{className:"h-4 w-4"})}),d&&e.jsx(u,{variant:"ghost",size:"sm",onClick:()=>d(s.id),children:e.jsx(ge,{className:"h-4 w-4"})})]})]})}),e.jsxs(I,{className:"space-y-3",children:[e.jsx("p",{className:"text-body text-muted-foreground line-clamp-2",children:s.body}),e.jsxs("div",{className:"space-y-2",children:[n&&e.jsxs("div",{className:"flex items-center gap-2 text-fine",children:[e.jsx(re,{className:"h-3 w-3 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"Job:"}),e.jsx("span",{className:"font-medium",children:n.title}),e.jsx("span",{className:"text-muted-foreground",children:"at"}),e.jsx("span",{className:"font-medium",children:n.company_name})]}),a&&e.jsxs("div",{className:"flex items-center gap-2 text-fine",children:[e.jsx(le,{className:"h-3 w-3 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"Contact:"}),e.jsx("span",{className:"font-medium",children:a.contact_name}),e.jsx("span",{className:"text-muted-foreground",children:"at"}),e.jsx("span",{className:"font-medium",children:a.company_name})]})]}),e.jsxs("div",{className:"flex items-center gap-4 text-fine text-muted-foreground pt-2 border-t",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(y,{className:"h-3 w-3"}),e.jsxs("span",{children:["Created ",ye(new Date(s.created_at),{addSuffix:!0})]})]}),s.scheduled_date&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(y,{className:"h-3 w-3"}),e.jsxs("span",{children:["Scheduled for ",new Date(s.scheduled_date).toLocaleDateString()]})]})]})]})]}),e.jsx(Oe,{open:i,onOpenChange:r,email:s,jobListing:n,contact:a})]})}function bs(){const{contacts:s,outreachEmails:n,jobs:a,isLoading:d,fetchContacts:i,fetchOutreachEmails:r,fetchJobs:o}=R(),[_,j]=h.useState(!1),[b,m]=h.useState(null),[x,f]=h.useState(!1),[k,c]=h.useState(null),{toast:T}=Ne(),v=t=>{c(t),f(!0)},C=(t,l)=>{console.log("Generated email:",{subject:t,body:l})},g=async t=>{try{const{error:l}=await ie.from("outreach_emails").delete().eq("id",t);if(l)throw l;T({title:"Email deleted",description:"The draft has been removed."}),r()}catch(l){console.error("Error deleting email:",l),T({title:"Error",description:"Failed to delete email draft.",variant:"destructive"})}};if(h.useEffect(()=>{i(),r(),o()},[i,r,o]),d)return e.jsx(ce,{message:"Loading outreach data..."});if(s.length===0&&n.length===0)return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold",children:"Outreach"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage contacts and email templates"})]}),e.jsx(H,{icon:e.jsx(Ae,{className:"h-6 w-6 text-muted-foreground"}),title:"No Outreach Yet",description:"Start building your network by adding contacts and creating personalized outreach emails.",actionLabel:"Add Contact",onAction:()=>j(!0)}),e.jsx(O,{open:_,onOpenChange:j,onSuccess:()=>i()})]});const N=s.filter(t=>t.next_followup_date&&new Date(t.next_followup_date)<=new Date);return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold",children:"Outreach"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage contacts and networking activities"})]}),e.jsxs(u,{onClick:()=>j(!0),size:"sm",children:[e.jsx(te,{className:"h-4 w-4 mr-1"}),"Add Contact"]})]}),e.jsxs("div",{className:"grid gap-3 grid-cols-3",children:[e.jsx(G,{className:"bg-gradient-to-br from-primary/5 to-primary/10",children:e.jsxs(I,{className:"p-4",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Total Contacts"}),e.jsx("p",{className:"text-3xl font-bold",children:s.length}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"connections"})]})}),e.jsx(G,{className:"bg-gradient-to-br from-accent/5 to-accent/10",children:e.jsxs(I,{className:"p-4",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Email Drafts"}),e.jsx("p",{className:"text-3xl font-bold",children:n.length}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"templates"})]})}),e.jsx(G,{className:"bg-gradient-to-br from-warning/5 to-warning/10",children:e.jsxs(I,{className:"p-4",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Follow-ups"}),e.jsx("p",{className:"text-3xl font-bold",children:N.length}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"pending"})]})})]}),e.jsxs(Ie,{defaultValue:"emails",className:"space-y-4",children:[e.jsxs(Pe,{children:[e.jsxs(Q,{value:"emails",children:["Emails (",n.length,")"]}),e.jsxs(Q,{value:"contacts",children:["Contacts (",s.length,")"]})]}),e.jsxs(Z,{value:"contacts",className:"space-y-3",children:[N.length>0&&e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"Needs Follow-up"}),e.jsx("div",{className:"space-y-2",children:N.map(t=>e.jsx(ee,{contact:t,onEdit:()=>m(t),onGenerateEmail:()=>v(t.id)},t.id))})]}),s.filter(t=>!N.includes(t)).length>0&&e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"All Contacts"}),e.jsx("div",{className:"space-y-2",children:s.filter(t=>!N.includes(t)).map(t=>e.jsx(ee,{contact:t,onEdit:()=>m(t),onGenerateEmail:()=>v(t.id)},t.id))})]})]}),e.jsx(Z,{value:"emails",className:"space-y-3",children:n.length===0?e.jsx(H,{icon:e.jsx(P,{className:"h-6 w-6 text-muted-foreground"}),title:"No Email Drafts",description:"Create email drafts by clicking 'Generate Email' on any contact c
3ard"}):e.jsx("div",{className:"space-y-2",children:n.map(t=>{const l=t.job_listing_id?a.find(A=>A.id===t.job_listing_id):void 0,S=t.contact_id?s.find(A=>A.id===t.contact_id):void 0;return e.jsx(Me,{email:t,jobListing:l,contact:S,onDelete:g},t.id)})})})]}),e.jsx(O,{open:_,onOpenChange:j,onSuccess:()=>i()}),e.jsx(O,{open:!!b,onOpenChange:t=>!t&&m(null),contact:b||void 0,onSuccess:()=>{i(),m(null)}}),k&&e.jsx(Le,{open:x,onOpenChange:f,contactId:k,onEmailGenerated:C})]})}export{bs as OutreachPage};
4//# sourceMappingURL=OutreachPage-De-RC0du.js.map

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.