var F=Object.defineProperty;var L=(a,r,t)=>r in a?F(a,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[r]=t;var x=(a,r,t)=>L(a,typeof r!="symbol"?r+"":r,t);import{j as e}from"./vendor-radix-DNp60FuA.js";import{L as f,r as E,k as I}from"./vendor-react-DL0tRKZA.js";import{c as R,a as J}from"./useJobs-BmJ2lN8b.js";import{B as p,G as H,u as B,N as M,H as $,A as z,I as q,K as P,L as G,M as v}from"./index-Dc36HHPJ.js";import{u as O}from"./vendor-query-CKQAY9LX.js";import{j as U}from"./supabase-queries-Ceab8Qnh.js";import{a as V}from"./index-xPTSEaYl.js";import{C as Y}from"./CompanyLogo-COTywlkX.js";import{f as A,g as K,a as Q}from"./dateUtils-BFcPElnC.js";import{E as w}from"./Explore-job-DL5B7p3G.js";import W from"./Footer-BBRo-XAf.js";import{H as X}from"./HeroSection-8MT9-Wpz.js";import{V as Z}from"./ViewTracker-DHmpH7Gq.js";import{S as l}from"./skeleton-C7GqSf6E.js";import{C as u,c as j,a as _,b as S}from"./card-Be4Gs9QI.js";import{A as D,a as T}from"./alert-JN3hfw6Q.js";import{C as ee}from"./circle-alert-CKGEFav4.js";import{R as y}from"./refresh-cw-DgVw4KhG.js";import{L as se}from"./loader-circle-aTjqobbq.js";import{B as te}from"./bug-CycLa0HK.js";import{T as ae}from"./triangle-alert-DROseprA.js";import{H as re}from"./house-COnQGyCU.js";import{M as ie}from"./index-hOh9tg3k.js";import{H as b}from"./HTMLContent-DsPGG4ZZ.js";import{J as le}from"./JobShareButton-DTMuhFn8.js";import{f as ne}from"./formatDistanceToNow-F80pU6-C.js";import"./vendor-supabase-B4f4CcZD.js";import"./vendor-charts-CPng-d0O.js";import"./whatsapp-bfrw3Kdz.js";import"./format-NXe5WdhZ.js";import"./en-US-DsJ0-K0a.js";import"./dollar-sign-DvFGzUZt.js";import"./euro-B_8vnTNv.js";import"./pound-sterling-B42_Kiau.js";import"./index-Cx3TF-Qd.js";import"./use-mobile-DG-UVPpq.js";import"./brain-BxprkCNg.js";import"./handshake-s4INUsX1.js";import"./cpu-BbsEHr72.js";import"./BreadcrumbWrapper-da9f410J.js";import"./chevron-right-BNNnROQC.js";import"./useViewTracking-Drx_jdhV.js";import"./input-DnjUB7rL.js";import"./label-C4Jig_0W.js";import"./share-2-TfCXO6QH.js";import"./copy-CZgMmGrC.js";import"./constructNow-Cf1joT6_.js";import"./differenceInCalendarMonths-DnfRIrCK.js";import"./endOfDay-DfXidCUT.js";import"./endOfMonth-DO4kXUER.js";import"./getRoundingMethod-D0I6Z7xl.js";function k({jobId:a,companyId:r,categoryId:t}={}){const s=a&&a.length>0&&a!=="fallback-job-id",{data:n,isLoading:c,error:o}=R(s?a:void 0,r,t,3);return c?e.jsxs("div",{className:"container lg:mt-24 mt-16",children:[e.jsxs("div",{className:"grid grid-cols-1 pb-8 text-center",children:[e.jsx("h3",{className:"mb-4 md:text-[26px] md:leading-normal text-2xl leading-normal font-semibold text-white",children:"Related Vacancies"}),e.jsx("p",{className:"text-slate-300 max-w-xl mx-auto",children:"Loading related jobs..."})]}),e.jsx("div",{className:"grid lg:grid-cols-3 md:grid-cols-2 mt-8 gap-[30px]",children:[...Array(3)].map((i,m)=>e.jsx("div",{className:"animate-pulse shadow-sm shadow-gray-200 dark:shadow-gray-700 p-6 rounded-md bg-white dark:bg-slate-900",children:e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:"size-14 bg-gray-200 dark:bg-gray-700 rounded-md"}),e.jsxs("div",{className:"ms-3",children:[e.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded w-24 mb-2"}),e.jsx("div",{className:"h-3 bg-gray-200 dark:bg-gray-700 rounded w-16"})]})]})})},m))})]}):o||!n||n.length===0?e.jsx("div",{className:"container lg:mt-24 mt-16",children:e.jsxs("div",{className:"grid grid-cols-1 pb-8 text-center",children:[e.jsx("h3",{className:"mb-4 md:text-[26px] md:leading-normal text-2xl leading-normal font-semibold text-white",children:"Related Vacancies"}),e.jsx("p",{className:"text-slate-300 max-w-xl mx-auto",children:"No related jobs found at this time."})]})}):e.jsx(e.Fragment,{children:e.jsxs("div",{className:"container lg:mt-24 mt-16",children:[e.jsxs("div",{className:"grid grid-cols-1 pb-8 text-center",children:[e.jsx("h3",{className:"mb-4 md:text-[26px] md:leading-normal text-2xl leading-normal font-semibold text-white",children:"Related Vacancies"}),e.jsx("p",{className:"text-slate-300 max-w-xl mx-auto",children:"Search all the open positions on the web. Get your own personalized salary estimate. Read reviews on over 30000+ companies worldwide."})]}),e.jsx("div",{className:"grid lg:grid-cols-3 md:grid-cols-2 mt-8 gap-[30px]",children:n.map(i=>{var m,h,d,g;return e.jsxs("div",{className:"group shadow-sm shadow-gray-200 dark:shadow-gray-700 p-6 rounded-md bg-white dark:bg-slate-900",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:"size-14 flex items-center justify-center bg-white dark:bg-slate-900 shadow-sm shadow-gray-200 dark:shadow-gray-700 rounded-md",children:e.jsx(Y,{logoUrl:(m=i.company)==null?void 0:m.logo_url,companyName:(h=i.company)==null?void 0:h.name,className:"size-8"})}),e.jsxs("div",{className:"ms-3",children:[e.jsx(f,{to:`/employer-detail/${(d=i.company)==null?void 0:d.id}`,className:"block text-[16px] font-semibold hover:text-emerald-600 transition-all duration-500",children:(g=i.company)==null?void 0:g.name}),e.jsx("span",{className:"block text-sm text-slate-400",children:A(i.created_at)})]})]}),e.jsx("span",{className:"bg-emerald-600/10 group-hover:bg-emerald-600 inline-block text-emerald-600 group-hover:text-white text-xs px-2.5 py-0.5 font-semibold rounded-full transition-all duration-500",children:i.job_type.replace("_"," ")})]}),e.jsxs("div",{className:"mt-6",children:[e.jsx(f,{to:`/job-detail-one/${i.id}`,className:"text-lg hover:text-emerald-600 font-semibold transition-all duration-500",children:i.title}),e.jsxs("h6",{className:"text-base font-medium flex items-center",children:[e.jsx(V,{className:"me-1"}),i.is_remote?"Remote":i.location||"Location not specified"]})]}),e.jsxs("div",{className:"mt-6",children:[e.jsx("div",{className:"w-full bg-gray-100 dark:bg-gray-800 rounded-full h-[6px]",children:e.jsx("div",{className:"bg-emerald-600 h-[6px] rounded-full",style:{width:`${Math.min((i.total_applications||0)/(i.max_applications||100)*100,100)}%`}})}),e.jsx("div",{className:"mt-2",children:e.jsxs("span",{className:"text-slate-400 text-sm",children:[e.jsxs("span",{className:"text-slate-900 dark:text-white font-semibold inline-block",children:[i.total_applications||0," applied"]}),i.max_applications?` of ${i.max_applications} vacancy`:""]})})]})]},i.id)})})]})})}const C=({count:a=3})=>e.jsx("div",{className:"space-y-4",children:Array.from({length:a}).map((r,t)=>e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(l,{className:"h-12 w-12 rounded-full"}),e.jsxs("div",{className:"space-y-2 flex-1",children:[e.jsx(l,{className:"h-4 w-3/4"}),e.jsx(l,{className:"h-4 w-1/2"})]})]},t))}),ce=({count:a=3})=>e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:Array.from({length:a}).map((r,t)=>e.jsx(u,{className:"p-6",children:e.jsxs(j,{className:"p-0",children:[e.jsx(l,{className:"h-48 w-full mb-4"}),e.jsx(l,{className:"h-6 w-3/4 mb-2"}),e.jsx(l,{className:"h-4 w-full mb-2"}),e.jsx(l,{className:"h-4 w-2/3"})]})},t))}),oe=({rows:a=5,cols:r=4})=>e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{className:"grid gap-4",style:{gridTemplateColumns:`repeat(${r}, 1fr)`},children:[Array.from({length:r}).map((t,s)=>e.jsx(l,{className:"h-10"},`header-${s}`)),Array.from({length:a}).map((t,s)=>Array.from({length:r}).map((n,c)=>e.jsx(l,{className:"h-8"},`${s}-${c}`)))]})}),de=()=>e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center space-x-6",children:[e.jsx(l,{className:"h-24 w-24 rounded-full"}),e.jsxs("div",{className:"space-y-2 flex-1",children:[e.jsx(l,{className:"h-8 w-1/3"}),e.jsx(l,{className:"h-4 w-2/3"}),e.jsx(l,{className:"h-4 w-1/2"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[e.jsx(l,{className:"h-32 w-full"}),e.jsx(l,{className:"h-24 w-full"})]}),e.jsx("div",{className:"space-y-4",children:e.jsx(l,{className:"h-48 w-full"})})]})]}),me=()=>e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx(l,{className:"h-8 w-1/3"}),e.jsx(l,{className:"h-10 w-32"})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:Array.from({length:4}).map((a,r)=>e.jsx(u,{className:"p-6",children:e.jsx(j,{className:"p-0",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(l,{className:"h-4 w-16"}),e.jsx(l,{className:"h-8 w-12"}),e.jsx(l,{className:"h-3 w-20"})]}),e.jsx(l,{className:"h-8 w-8 rounded"})]})})},r))}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[e.jsx(u,{className:"p-6",children:e.jsx(j,{className:"p-0",children:e.jsx(l,{className:"h-64 w-full"})})}),e.jsx(u,{className:"p-6",children:e.jsx(j,{className:"p-0",children:e.jsx(l,{className:"h-64 w-full"})})})]})]}),xe=(a,r)=>{switch(a){case"list":return e.jsx(C,{count:r});case"card":return e.jsx(ce,{count:r});case"table":return e.jsx(oe,{rows:r});case"profile":return e.jsx(de,{});case"dashboard":return e.jsx(me,{});default:return e.jsx(C,{count:r})}},he=({error:a,onRetry:r,errorText:t})=>e.jsxs(D,{variant:"destructive",className:"max-w-2xl mx-auto",children:[e.jsx(ee,{className:"h-4 w-4"}),e.jsx(T,{children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("p",{children:t||(a==null?void 0:a.message)||"An unexpected error occurred"}),r&&e.jsxs(p,{variant:"outline",size:"sm",onClick:r,className:"w-fit",children:[e.jsx(y,{className:"h-4 w-4 mr-2"}),"Try Again"]})]})})]}),pe=({emptyText:a})=>e.jsxs("div",{className:"text-center py-12",children:[e.jsx("div",{className:"mx-auto w-48 h-48 mb-4 opacity-20",children:e.jsxs("svg",{viewBox:"0 0 200 200",className:"w-full h-full",children:[e.jsx("circle",{cx:"100",cy:"100",r:"50",fill:"currentColor",opacity:"0.1"}),e.jsx("path",{d:"M100 70v20m0 20v20m-20-30h20m20 0h20",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}),e.jsx("p",{className:"text-lg font-medium text-muted-foreground mb-2",children:"No data found"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:a||"There's nothing here yet. Check back later or try refreshing the page."})]}),ue=({loadingText:a,skeletonType:r})=>e.jsxs("div",{className:"space-y-4",children:[a&&e.jsxs("div",{className:"flex items-center justify-center py-4",children:[e.jsx(se,{className:"h-5 w-5 animate-spin mr-2"}),e.jsx("span",{className:"text-sm text-muted-foreground",children:a})]}),xe(r||"list")]}),je=({isLoading:a,error:r,isEmpty:t=!1,children:s,loadingComponent:n,errorComponent:c,emptyComponent:o,onRetry:i,loadingText:m,errorText:h,emptyText:d,skeletonType:g="list",className:N})=>a?e.jsx("div",{className:N,children:n||e.jsx(ue,{loadingText:m,skeletonType:g})}):r?e.jsx("div",{className:N,children:c||e.jsx(he,{error:r,onRetry:i,errorText:h})}):t?e.jsx("div",{className:N,children:o||e.jsx(pe,{emptyText:d})}):e.jsx("div",{className:N,children:s});class fe extends E.Component{constructor(t){super(t);x(this,"reportError",(t,s)=>{try{H(t,{contexts:{react:{componentStack:s.componentStack},errorBoundary:{errorId:this.state.errorId,level:this.props.level||"component",category:this.getErrorCategory(t)}}});const n={message:t.message,stack:t.stack,componentStack:s.componentStack,timestamp:new Date().toISOString(),url:window.location.href,userAgent:navigator.userAgent,errorId:this.state.errorId,level:this.props.level||"component"};console.error("Error reported:",n)}catch(n){console.error("Failed to report error:",n)}});x(this,"handleRetry",()=>{this.setState({hasError:!1,error:void 0,errorInfo:void 0})});x(this,"handleRefresh",()=>{window.location.reload()});x(this,"handleGoHome",()=>{window.location.href="/"});x(this,"getErrorCategory",t=>{if(!t)return"unknown";const s=t.message.toLowerCase();return s.includes("chunk")||s.includes("loading")?"loading":s.includes("network")||s.includes("fetch")?"network":s.includes("permission")||s.includes("auth")?"permission":s.includes("not found")||s.includes("404")?"notFound":"application"});x(this,"getUserFriendlyMessage",t=>{switch(t){case"loading":return{title:"Loading Error",description:"There was a problem loading this part of the application. This usually resolves itself with a refresh."};case"network":return{title:"Connection Issue",description:"Unable to connect to our servers. Please check your internet connection and try again."};case"permission":return{title:"Access Denied",description:"You don't have permission to access this resource. Please log in or contact support if you believe this is an error."};case"notFound":return{title:"Content Not Found",description:"The requested content could not be found. It may have been moved or deleted."};default:return{title:"Something went wrong",description:"An unexpected error occurred. Our team has been notified and will investigate the issue."}}});x(this,"renderErrorDetails",()=>!this.props.showDetails||!this.state.error?null:e.jsxs(u,{className:"mt-6 border-destructive/20",children:[e.jsx(_,{children:e.jsxs(S,{className:"text-sm flex items-center gap-2",children:[e.jsx(te,{className:"h-4 w-4"}),"Technical Details"]})}),e.jsx(j,{children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-1",children:"Error ID:"}),e.jsx("code",{className:"text-xs bg-muted p-1 rounded",children:this.state.errorId})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-1",children:"Error Message:"}),e.jsx("code",{className:"text-xs bg-muted p-2 rounded block break-all",children:this.state.error.message})]}),this.state.error.stack&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-1",children:"Stack Trace:"}),e.jsx("pre",{className:"text-xs bg-muted p-2 rounded overflow-auto max-h-32",children:this.state.error.stack})]})]})})]}));this.state={hasError:!1}}static getDerivedStateFromError(t){const s=`error_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;return{hasError:!0,error:t,errorId:s}}componentDidCatch(t,s){console.error("Error Boundary caught an error:",t),console.error("Error Info:",s),this.setState({errorInfo:s}),this.reportError(t,s),this.props.onError&&this.props.onError(t,s)}render(){if(this.state.hasError){if(this.props.fallback)return this.props.fallback;const t=this.getErrorCategory(this.state.error),{title:s,description:n}=this.getUserFriendlyMessage(t),c=this.props.level==="critical";return e.jsx("div",{className:"min-h-[400px] flex items-center justify-center p-6",children:e.jsxs("div",{className:"w-full max-w-2xl",children:[e.jsxs(D,{variant:"destructive",className:"mb-6",children:[e.jsx(ae,{className:"h-4 w-4"}),e.jsx(T,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-base mb-2",children:s}),e.jsx("p",{className:"text-sm",children:n})]}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Error ID: ",this.state.errorId]})]})})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[!c&&e.jsxs(p,{onClick:this.handleRetry,variant:"default",className:"flex items-center gap-2",children:[e.jsx(y,{className:"h-4 w-4"}),"Try Again"]}),e.jsxs(p,{onClick:this.handleRefresh,variant:"outline",className:"flex items-center gap-2",children:[e.jsx(y,{className:"h-4 w-4"}),"Refresh Page"]}),e.jsxs(p,{onClick:this.handleGoHome,variant:"outline",className:"flex items-center gap-2",children:[e.jsx(re,{className:"h-4 w-4"}),"Go Home"]})]}),this.renderErrorDetails(),e.jsx("div",{className:"mt-6 text-center text-sm text-muted-foreground",children:"If this problem persists, please contact our support team with the error ID above."})]})})}return this.props.children}}function ge({title:a,companyName:r,description:t,shareUrl:s}){return E.useEffect(()=>{document.title=`${a} at ${r} | Talent Hunter`;let n=document.querySelector('meta[name="description"]');n||(n=document.createElement("meta"),n.setAttribute("name","description"),document.head.appendChild(n));const c=t?t.replace(/<[^>]*>/g,"").substring(0,155)+"...":`${a} position at ${r}. Apply now on Talent Hunter.`;n.setAttribute("content",c);let o=document.querySelector('meta[name="robots"]');if(o||(o=document.createElement("meta"),o.setAttribute("name","robots"),document.head.appendChild(o)),o.setAttribute("content","index, follow"),s){let i=document.querySelector('link[rel="canonical"]');i||(i=document.createElement("link"),i.setAttribute("rel","canonical"),document.head.appendChild(i)),i.setAttribute("href",s)}return()=>{document.title="Talent Hunter | AI Jobs Board for Smarter Hiring"}},[a,r,t,s]),null}function fs(){var i,m,h;const{id:a}=I(),{user:r}=B(),{data:t}=O({queryKey:["jobStatus",a],queryFn:()=>U.checkJobStatus(a||""),enabled:!!a}),{data:s,isLoading:n,error:c}=J(a||""),o=()=>t&&t.exists&&!t.isActive?"This job is no longer accepting applications.":"This job posting is no longer available.";return e.jsxs(fe,{level:"page",showDetails:!1,children:[s&&e.jsx(Z,{itemId:s.id,itemType:"job",viewerType:"candidate"}),e.jsxs(je,{isLoading:n,error:c,isEmpty:!s&&!(t!=null&&t.exists&&!t.isActive),skeletonType:"profile",loadingText:"Loading job details...",errorText:"Failed to load job details. Please try again.",emptyText:o(),onRetry:()=>window.location.reload(),children:[e.jsx(M,{navClass:"!justify-end nav-light"}),s&&e.jsxs(e.Fragment,{children:[e.jsx(ge,{title:s.title,companyName:((i=s.company)==null?void 0:i.name)||"Company",description:s.description,shareUrl:s.share_url}),e.jsx(X,{title:s.title,description:`at ${(m=s.company)==null?void 0:m.name}`,breadcrumbItems:[{label:"Home",href:"/"},{label:"Jobs",href:"/job-list"},{label:"Job Detail",isActive:!0}],variant:"emerald"})]}),s&&e.jsxs("section",{className:"relative md:py-24 py-16",children:[e.jsx("div",{className:"container",children:e.jsxs("div",{className:"grid md:grid-cols-12 grid-cols-1 gap-[30px]",children:[e.jsx("div",{className:"lg:col-span-4 md:col-span-6",children:e.jsxs("div",{className:"bg-black/40 backdrop-blur-xl border border-white/10 shadow-[0_0_30px_rgba(168,85,247,0.15)] rounded-2xl sticky top-20",children:[e.jsx("div",{className:"p-6",children:e.jsx("h5",{className:"text-lg font-semibold text-white",children:"Job Information"})}),e.jsx("div",{className:"p-6 border-t border-white/10",children:e.jsxs("ul",{className:"list-none",children:[e.jsxs("li",{className:"flex items-center",children:[e.jsx($,{className:"size-5"}),e.jsxs("div",{className:"ms-4",children:[e.jsx("p",{className:"font-medium",children:"Employee Type:"}),e.jsx("span",{className:"text-primary font-medium text-sm capitalize",children:s.job_type.replace("-"," ")})]})]}),e.jsxs("li",{className:"flex items-center mt-3",children:[e.jsx(z,{className:"size-5"}),e.jsxs("div",{className:"ms-4",children:[e.jsx("p",{className:"font-medium",children:"Location:"}),e.jsx("span",{className:"text-primary font-medium text-sm",children:s.is_remote?"Remote":s.location||"Not specified"})]})]}),e.jsxs("li",{className:"flex items-center mt-3",children:[e.jsx(q,{className:"size-5"}),e.jsxs("div",{className:"ms-4",children:[e.jsx("p",{className:"font-medium",children:"Job Type:"}),e.jsx("span",{className:"text-primary font-medium text-sm",children:s.title})]})]}),e.jsxs("li",{className:"flex items-center mt-3",children:[e.jsx(P,{className:"size-5"}),e.jsxs("div",{className:"ms-4",children:[e.jsx("p",{className:"font-medium",children:"Experience Level:"}),e.jsx("span",{className:"text-primary font-medium text-sm capitalize",children:s.experience_level||"Not specified"})]})]}),e.jsxs("li",{className:"flex items-center mt-3",children:[e.jsx(G,{className:"size-5"}),e.jsxs("div",{className:"ms-4",children:[e.jsx("p",{className:"font-medium",children:"Category:"}),e.jsx("span",{className:"text-primary font-medium text-sm",children:((h=s.category)==null?void 0:h.name)||"Not specified"})]})]}),e.jsxs("li",{className:"flex items-center mt-3",children:[(()=>{const d=K(s.salary_currency||"USD");return e.jsx(d,{className:"size-5"})})(),e.jsxs("div",{className:"ms-4",children:[e.jsx("p",{className:"font-medium",children:"Salary:"}),e.jsx("span",{className:"text-primary font-medium text-sm",children:Q(s.salary_min,s.salary_max,s.salary_currency)})]})]}),e.jsxs("li",{className:"flex items-center mt-3",children:[e.jsx(v,{className:"size-5"}),e.jsxs("div",{className:"ms-4",children:[e.jsx("p",{className:"font-medium",children:"Date posted:"}),e.jsx("span",{className:"text-primary font-medium text-sm",children:ne(new Date(s.created_at),{addSuffix:!0})})]})]}),s.application_deadline&&e.jsxs("li",{className:"flex items-center mt-3",children:[e.jsx(v,{className:"size-5"}),e.jsxs("div",{className:"ms-4",children:[e.jsx("p",{className:"font-medium",children:"Application Deadline:"}),e.jsx("span",{className:"text-primary font-medium text-sm",children:A(s.application_deadline)})]})]})]})}),e.jsx("div",{className:"p-6 border-t border-white/10",children:e.jsx(le,{shareUrl:s.share_url,jobTitle:s.title,showSocialButtons:!0})})]})}),e.jsxs("div",{className:"lg:col-span-8 md:col-span-6",children:[e.jsx("h5",{className:"text-lg font-semibold text-white",children:"Job Description:"}),s.description&&e.jsx(b,{content:s.description,className:"mt-4"}),s.requirements&&e.jsxs(e.Fragment,{children:[e.jsx("h5",{className:"text-lg font-semibold mt-6 text-white",children:"Requirements:"}),e.jsx(b,{content:s.requirements,className:"mt-4"})]}),s.benefits&&e.jsxs(e.Fragment,{children:[e.jsx("h5",{className:"text-lg font-semibold mt-6 text-white",children:"Benefits:"}),e.jsx(b,{content:s.benefits,className:"mt-4"})]}),s.skills&&s.skills.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("h5",{className:"text-lg font-semibold mt-6 text-white",children:"Required Skills:"}),e.jsx("ul",{className:"list-none mt-4",children:s.skills.map(d=>e.jsxs("li",{className:"text-muted-foreground mt-2 inline-flex items-center",children:[e.jsx(ie,{className:"text-primary me-1"}),d.skill_name,d.is_required&&e.jsx("span",{className:"text-primary ml-1",children:"*"})]},d.id))}),e.jsx("p",{className:"text-xs text-slate-400 mt-2",children:"* Required skills"})]}),e.jsx("div",{className:"mt-5",children:e.jsx(f,{to:`/job-apply?jobId=${s.id}`,className:"py-2 px-6 inline-block font-semibold tracking-wide border align-middle transition duration-500 ease-in-out text-base text-center rounded-md bg-primary hover:bg-primary/90 border-primary hover:border-primary/90 text-primary-foreground md:ms-2 w-full md:w-auto",children:"Apply Now"})})]})]})}),e.jsx(k,{jobId:a,categoryId:s.category_id,companyId:s.company_id}),e.jsx(w,{})]}),!s&&(t==null?void 0:t.exists)&&!t.isActive&&e.jsxs("div",{className:"min-h-screen bg-black bg-gradient-to-br from-black-900 via-black-800 to-emerald-900",children:[e.jsx("div",{className:"flex items-center justify-center min-h-[calc(100vh-200px)] px-4 py-12",children:e.jsxs(u,{className:"w-full max-w-2xl",children:[e.jsxs(_,{children:[e.jsx(S,{className:"text-2xl",children:"Job No Longer Available"}),t.title&&e.jsxs("p",{className:"text-lg text-muted-foreground mt-2",children:['"',t.title,'"']})]}),e.jsxs(j,{className:"space-y-4",children:[e.jsx("p",{className:"text-muted-foreground",children:"This job is no longer accepting applications. The position may have been filled or removed by the employer."}),e.jsx("p",{className:"text-muted-foreground",children:"But we have other great opportunities you might be interested in!"}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 pt-2",children:[e.jsx(p,{asChild:!0,className:"flex-1",children:e.jsx(f,{to:"/job-list",children:"Browse All Jobs"})}),e.jsx(p,{asChild:!0,variant:"outline",className:"flex-1",children:e.jsx(f,{to:"/",children:"Go to Home"})})]})]})]})}),e.jsxs("div",{className:"container pb-12",children:[e.jsx("h3",{className:"text-2xl font-bold text-center mb-8 text-white",children:"Similar Opportunities"}),e.jsx(k,{}),e.jsx("div",{className:"mt-12",children:e.jsx(w,{})})]})]}),e.jsx(W,{})]})]})}export{fs as default};