import{u as B,j as e,H as P,L as m,bm as j,bv as h,b3 as u,x as p,k as f,cE as S,cF as k,cv as D,cG as z,C as L,b8 as F,b4 as E,T as H,e as J}from"./vendor-BKmmeuxg.js";import{D as G}from"./delete-modal-D1GJlb1P.js";import{T as I}from"./table-filter-D1fnjeZE.js";import{T as M}from"./table-footer-B-sB7gNG.js";import{B as U}from"./badge-AQfLLMpR.js";import{B as a}from"./button-BpNwv2aE.js";import{C as t,a as l,c,b as r}from"./card-D9_SJYq6.js";import{D as q}from"./layout-DkwBWm5d.js";import"./dialog-B2gN9MvT.js";import"./utils-DxSsnXxD.js";import"./use-lang-YfV87_zl.js";import"./debounce-CWHP_ANh.js";import"./route-B4ZMN77y.js";import"./dropdown-menu-DO-po5c1.js";import"./scroll-area-C8HGru-R.js";import"./table-page-size-OCfjNXER.js";import"./index-WW_1X1qx.js";import"./sidebar-BYcYxQeZ.js";import"./separator-_3LZ_wAA.js";import"./sheet-DSvHVmaW.js";import"./tooltip-BsX7Z6vz.js";import"./main-_V386djS.js";import"./index-D9-QKOod.js";import"./appearance-D2z3xcjR.js";import"./app-BytVvUs_.js";/* empty css */import"./language-BFZ7KItL.js";import"./notification-CYMPYbAP.js";import"./popover-B4kBsMuI.js";import"./app-logo-CmnEIwal.js";import"./accordion-CNBvFN43.js";import"./avatar-j28afJTV.js";const R=()=>{const{props:x}=B(),{jobCirculars:n,statistics:i,jobTypes:N,workTypes:g,experienceLevels:b,statuses:v,translate:w}=x,{dashboard:d,button:y,common:o}=w,C=s=>{const T={draft:"outline",active:"default",paused:"secondary",closed:"destructive",expired:"destructive"};return e.jsx(U,{variant:T[s]||"outline",children:v[s]||s})},_=s=>{J.put(route("job-circulars.toggle-status",s),{},{preserveState:!0,preserveScroll:!0})};return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:d.job_circulars}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h1",{className:"text-xl font-semibold",children:d.job_circulars}),e.jsx(a,{asChild:!0,children:e.jsxs(m,{href:route("job-circulars.create"),children:[e.jsx(j,{className:"mr-2 h-4 w-4"}),"Create Job Circular"]})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4 md:grid-cols-4 xl:grid-cols-5",children:[e.jsxs(t,{children:[e.jsxs(l,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(c,{className:"text-sm font-medium",children:d.total_jobs}),e.jsx(h,{className:"text-muted-foreground h-4 w-4"})]}),e.jsx(r,{children:e.jsx("div",{className:"text-2xl font-bold",children:i.total})})]}),e.jsxs(t,{children:[e.jsxs(l,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(c,{className:"text-sm font-medium",children:o.active}),e.jsx(u,{className:"h-4 w-4 text-green-600"})]}),e.jsx(r,{children:e.jsx("div",{className:"text-2xl font-bold text-green-600",children:i.active})})]}),e.jsxs(t,{children:[e.jsxs(l,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(c,{className:"text-sm font-medium",children:o.draft}),e.jsx(p,{className:"h-4 w-4 text-yellow-600"})]}),e.jsx(r,{children:e.jsx("div",{className:"text-2xl font-bold text-yellow-600",children:i.draft})})]}),e.jsxs(t,{children:[e.jsxs(l,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(c,{className:"text-sm font-medium",children:o.closed}),e.jsx(f,{className:"h-4 w-4 text-orange-600"})]}),e.jsx(r,{children:e.jsx("div",{className:"text-2xl font-bold text-orange-600",children:i.closed})})]}),e.jsxs(t,{children:[e.jsxs(l,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(c,{className:"text-sm font-medium",children:o.expired}),e.jsx(f,{className:"h-4 w-4 text-red-600"})]}),e.jsx(r,{children:e.jsx("div",{className:"text-2xl font-bold text-red-600",children:i.expired})})]})]}),e.jsxs(t,{children:[e.jsx(I,{data:n,title:"Job Circulars",globalSearch:!0,tablePageSizes:[10,15,20,25],routeName:"job-circulars.index"}),e.jsx(r,{className:"p-4 sm:p-6",children:n.data.length>0?e.jsx("div",{className:"space-y-4",children:n.data.map(s=>e.jsx("div",{className:"hover:bg-muted/50 rounded-lg border p-4 transition-colors",children:e.jsxs("div",{className:"flex flex-col items-start justify-between gap-7 md:flex-row md:gap-4",children:[e.jsxs("div",{className:"flex-1 space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h3",{className:"text-lg font-semibold",children:s.title}),C(s.status)]}),e.jsxs("div",{className:"text-muted-foreground flex flex-wrap items-center gap-4 text-sm",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(S,{className:"h-4 w-4"}),s.location]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(h,{className:"h-4 w-4"}),N[s.job_type]]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(k,{className:"h-4 w-4"}),g[s.work_type]]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(D,{className:"h-4 w-4"}),b[s.experience_level]]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(z,{className:"h-4 w-4"}),s.positions_available," Position",s.positions_available!==1?"s":""]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(L,{className:"h-4 w-4"}),new Date(s.application_deadline).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(a,{variant:"outline",size:"sm",asChild:!0,children:e.jsx(m,{href:route("job-circulars.show",s.id),children:e.jsx(F,{className:"h-4 w-4"})})}),e.jsx(a,{variant:"outline",size:"sm",asChild:!0,children:e.jsx(m,{href:route("job-circulars.edit",s.id),children:e.jsx(p,{className:"h-4 w-4"})})}),e.jsx(a,{variant:"outline",size:"sm",onClick:()=>_(Number(s.id)),children:s.status==="active"?e.jsx(E,{className:"h-4 w-4"}):e.jsx(u,{className:"h-4 w-4"})}),e.jsx(G,{routePath:route("job-circulars.destroy",s.id),actionComponent:e.jsx(a,{variant:"outline",size:"sm",children:e.jsx(H,{className:"text-destructive h-4 w-4"})})})]})]})},s.id))}):e.jsxs("div",{className:"py-12 text-center",children:[e.jsx(h,{className:"text-muted-foreground mx-auto h-12 w-12"}),e.jsx("h3",{className:"mt-4 text-lg font-semibold",children:d.no_job_circulars_found}),e.jsx("p",{className:"text-muted-foreground mt-2 text-sm",children:"Get started by creating your first job circular."}),e.jsx(a,{className:"mt-4",asChild:!0,children:e.jsxs(m,{href:route("job-circulars.create"),children:[e.jsx(j,{className:"mr-2 h-4 w-4"}),y.create_job]})})]})}),e.jsx(M,{className:"p-5 sm:p-7",routeName:"job-circulars.index",paginationInfo:n})]})]})]})};R.layout=x=>e.jsx(q,{children:x});export{R as default};