import{h as f}from"./moment-a9aaa855.js";import{_ as v}from"./NoDataFound-bc81d7fa.js";import g from"./OverviewGrid-21ea6fc2.js";import{s as w,l as k,A as x,p as o,T as y,m as C,h as p,c as d,a,b as t,t as s,u as e,F as A,r as j,i as I,g as $,o as l,n as B,j as h}from"./app-13978987.js";import{_ as D}from"./AdminLayout-bd13ff9d.js";import{_ as L}from"./PageHeader-8c638686.js";import{d as M}from"./drawer-fe4c5e1a.js";import"./dropdown-45d66330.js";const T={class:"container p-4 sm:p-6"},E={class:"space-y-6"},z={class:"table-responsive whitespace-nowrap rounded-primary"},F={class:"table"},N={class:"text-right"},V={key:0},J={class:"text-left"},O={class:""},R={class:"dropdown","data-placement":"bottom-start"},S={class:"dropdown-toggle"},Y={class:"dropdown-content w-40"},q={class:"dropdown-list"},G={class:"dropdown-list-item"},H={class:"dropdown-list-item"},K={class:"dropdown-list-item"},P=["onClick"],Q=$({layout:D}),lt=Object.assign(Q,{__name:"Index",props:["jobs","total","active","inActive","buttons","segments"],setup(i){const{deleteRow:m}=w();k(()=>{M.init()});const r=i,b=x(()=>[{value:r.total,title:o("Total"),iconClass:"bx:badge"},{value:r.active,title:o("Active"),iconClass:"bx:badge-check"},{value:r.inActive,title:o("Inactive"),iconClass:"bx:x-circle"}]);return y({title:"",preview:"",short_description:"",description:"",is_featured:"",meta:{seo:{title:"",image:"",description:"",tags:""}},status:"active"}),C({}),(u,U)=>{const c=p("Icon"),_=p("Link");return l(),d("main",T,[a(L,{title:"Jobs",buttons:i.buttons},null,8,["buttons"]),t("div",E,[a(g,{items:b.value,grid:"3"},null,8,["items"]),t("div",z,[t("table",F,[t("thead",null,[t("tr",null,[t("th",null,s(e(o)("Title")),1),t("th",null,s(e(o)("Location")),1),t("th",null,s(e(o)("Type")),1),t("th",null,s(e(o)("Expertise")),1),t("th",null,s(e(o)("Applications")),1),t("th",null,s(e(o)("Is Active")),1),t("th",null,s(e(o)("Created At")),1),t("th",null,[t("p",N,s(e(o)("Action")),1)])])]),i.jobs.total?(l(),d("tbody",V,[(l(!0),d(A,null,j(i.jobs.data,n=>(l(),d("tr",{key:n.id},[t("td",null,s(n.title),1),t("td",null,s(n.location),1),t("td",null,s(n.type),1),t("td",null,s(n.expert_level),1),t("td",null,s(n.applications_count),1),t("td",J,[t("span",{class:B(["badge",n.is_active?"badge-success":"badge-danger"])},s(n.is_active?e(o)("Active"):e(o)("Draft")),3)]),t("td",null,s(e(f)(n.created_at).format("D-MMM-Y")),1),t("td",O,[t("div",R,[t("div",S,[a(c,{class:"text-2xl",icon:"bx:dots-horizontal-rounded"})]),t("div",Y,[t("ul",q,[t("li",G,[a(_,{href:u.route("admin.jobs.show",n),class:"dropdown-link"},{default:h(()=>[a(c,{icon:"fe:eye"}),t("span",null,s(e(o)("Applications")),1)]),_:2},1032,["href"])]),t("li",H,[a(_,{href:u.route("admin.jobs.edit",n),class:"dropdown-link"},{default:h(()=>[a(c,{icon:"fe:edit"}),t("span",null,s(e(o)("Edit")),1)]),_:2},1032,["href"])]),t("li",K,[t("button",{as:"button",class:"dropdown-link",onClick:W=>e(m)(u.route("admin.jobs.destroy",n.slug))},[a(c,{icon:"fe:trash"}),t("span",null,s(e(o)("Delete")),1)],8,P)])])])])])]))),128))])):(l(),I(v,{key:1,"for-table":"true"}))])])])])}}});export{lt as default};
