1import{R as u,j as t}from"./animation-CddyXVCz.js";import{ab as h,D as g,u as b,h as d,B as o,w as j}from"./index-CGKNpi9E.js";import{J as f}from"./JobDetailPanel-CXiO4exJ.js";import{P as l}from"./PageWrapper-BunOBjUW.js";import"./react-vendor-CbN3pvl2.js";import"./supabase-iKSPld20.js";import"./docgen-Bp8WKBAE.js";import"./query-DPqpbKNH.js";import"./htmlEntities-97NJt3YN.js";import"./scoreSeverity-CZDyLV63.js";const w=()=>{const{jobId:s}=h(),i=g(),{state:m}=b(),{jobListings:c,selectedJob:n}=m,e=u.useMemo(()=>n&&n.id===s?n:c.find(a=>a.id===s),[s,c,n]),y=a=>{i("/app/tailor",{state:{jobDescription:a.descriptionFull||a.descriptionSnippet||"",jobTitle:a.title,company:a.company}})};if(!s)return t.jsx(l,{title:"Job Not Found",maxWidth:"4xl",children:t.jsx(d,{children:t.jsxs("div",{className:"text-center py-8",children:[t.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"No job ID provided."}),t.jsx(o,{onClick:()=>i("/app/search"),variant:"primary",children:"Back to Job Search"})]})})});if(!e)return t.jsx(l,{title:"Job Not Found",maxWidth:"4xl",children:t.jsx(d,{children:t.jsxs("div",{className:"space-y-4 py-10 text-center",children:[t.jsx("div",{className:"mx-auto flex h-14 w-14 items-center justify-center rounded-2xl bg-blue-50 text-blue-600 dark:bg-blue-500/10 dark:text-blue-300",children:t.jsx(j,{className:"h-7 w-7"})}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-slate-100",children:"No job found"}),t.jsx("p",{className:"text-sm text-gray-600 dark:text-slate-400",children:"This role is no longer in your current results. Search again to find fresh openings."})]}),t.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 sm:flex-row",children:[t.jsx(o,{onClick:()=>i("/app/search"),variant:"primary",children:"Search for Jobs"}),t.jsx(o,{onClick:()=>i("/app/applications"),variant:"ghost",children:"Open Job Tracker"})]})]})})});const x=a=>"jobTitle"in a||"url"in a,r=(()=>{if(x(e)){const p=e.id||e.externalId||e.url||"";return{id:p,source:e.source||"jsearch",externalId:e.externalId||p,title:e.jobTitle||e.title||"Untitled role",company:e.company||"Unknown company",locationText:e.location||"",descriptionSnippet:e.descriptionSnippet||e.description||"",descriptionFull:e.description||e.descriptionSnippet,applyUrl:e.url,matchScore:e.matchScore,matchJustification:e.matchJustification}}const a=e.id||e.externalId||"";return{id:a,source:e.source||"jsearch",externalId:e.externalId||a,title:e.title,company:e.company,locationText:e.locationText,location:e.location,descriptionSnippet:e.descriptionSnippet,descriptionFull:e.descriptionFull||e.descriptionSnippet,applyUrl:e.applyUrl,matchScore:e.matchScore,matchJustification:e.matchJustification,postedAt:e.postedAt,salaryMin:e.salaryMin,salaryMax:e.salaryMax,salaryCurrency:e.salaryCurrency,employmentType:e.employmentType,remote:e.remote,tags:e.tags,applicationDeadline:e.applicationDeadline,daysUntilClose:e.daysUntilClose,whoMayApply:e.whoMayApply,securityClearance:e.securityClearance,travelPercentage:e.travelPercentage,totalOpenings:e.totalOpenings,positionType:e.positionType,supervisoryStatus:e.supervisoryStatus,gradeLevel:e.gradeLevel,salaryIsPredicted:e.salaryIsPredicted,educationRequired:e.educationRequired,department:e.department,subAgency:e.subAgency,companyLogoUrl:e.companyLogoUrl,companyWebsiteUrl:e.companyWebsiteUrl,companyType:e.companyType,jobHighlights:e.jobHighlights,applyOptions:e.applyOptions,qualityScore:e.qualityScore,isUrgent:e.isUrgent}})();return t.jsx(l,{title:`${r.title} at ${r.company}`,description:(r.descriptionFull||r.descriptionSnippet||"").substring(0,160)||"Job details",maxWidth:"4xl",children:t.jsxs("div",{className:"space-y-4",children:[t.jsx(o,{onClick:()=>i("/app/search"),variant:"ghost",size:"sm",className:"text-blue-600 dark:text-blue-400",leftIcon:t.jsx("span",{children:"â"}),children:"Back to Job Search"}),t.jsx(f,{job:r,onTailor:y})]})})};export{w as JobDetailPage};
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.