import{_ as M}from"./AdminLayout-bd13ff9d.js";import{_ as S}from"./PageHeader-8c638686.js";import{h as v}from"./moment-a9aaa855.js";import{A as f,h as D,c as a,a as g,b as s,j as C,t as e,n as N,F as d,r,u as j,e as y,g as T,o as i,k as p}from"./app-13978987.js";import"./dropdown-45d66330.js";const Y={class:"container flex-grow p-4 sm:p-6"},E={class:"space-y-6"},H={class:"grid grid-cols-1 gap-6 lg:grid-cols-4"},J={class:"col-span-1 flex h-min w-full flex-col gap-6 lg:sticky lg:top-20"},O={class:"card"},$={class:"card-body flex flex-col gap-y-3"},z={class:"relative my-2 h-16 w-16"},A=["src"],V={class:"description"},B={class:"flex flex-wrap gap-x-4"},F=["href"],R={class:"col-span-3"},q={class:"flex h-full flex-wrap gap-4"},I={class:"flex-grow"},W={class:"card h-full"},x={class:"card-body space-y-4"},G={class:"font-bold"},K=["innerHTML"],P=["innerHTML"],Q={class:"ml-5"},U={class:"font-semibold"},X={class:"ml-5"},Z={class:"grid grid-cols-4 gap-y-6"},ss={class:"font-semibold"},es={class:"font-semibold"},ts={class:"font-semibold"},ls={key:0},ns={key:1},as={class:"font-semibold"},is={class:"font-semibold"},os={class:"font-semibold"},ds={class:"font-semibold"},rs={class:"font-semibold"},cs={key:0,class:"mt-1 grid grid-cols-3"},us=s("br",null,null,-1),hs=T({layout:M}),ys=Object.assign(hs,{__name:"Show",props:["job","buttons","segments"],setup(t){const k=t,_=f(()=>k.job.user.meta),w=f(()=>_.value.social);return(l,ms)=>{var c,u,h,m,b;const L=D("Link");return i(),a("main",Y,[g(S,{title:"Job details",buttons:t.buttons},null,8,["buttons"]),s("div",E,[s("div",H,[s("section",J,[s("div",O,[s("div",$,[s("div",z,[s("img",{src:t.job.user.avatar==null?`https://ui-avatars.com/api/?name=${t.job.user.name}`:`${t.job.user.avatar}`,alt:" avatar-img",class:"h-full w-full rounded-full"},null,8,A)]),s("div",null,[g(L,{href:l.route("admin.users.show",t.job.user_id),class:"mb-1 block font-medium text-slate-700 dark:text-slate-200"},{default:C(()=>[p(e(t.job.user.name),1)]),_:1},8,["href"]),s("span",V,e(l.trans("Status"))+": ",1),s("span",{class:N(["badge badge-sm",t.job.status==1?"badge-success":"badge-danger"])},e(t.job.status==1?l.trans("Active"):l.trans("Inactive")),3)]),s("div",null,[s("h5",null,e(l.trans("Overview")),1),s("div",null,e(t.job.user.meta.business.description),1)]),s("div",null,e(l.trans("Join Date: "))+" "+e(t.job.user.created_at_date),1),s("div",null,[s("h5",null,e(l.trans("Socials")),1),s("ul",B,[(i(!0),a(d,null,r(w.value,(n,o)=>(i(),a("li",{class:"capitalize",key:o},[n?(i(),a("a",{key:0,href:n.startsWith("http")?n:`https://${n}`,target:"_blank",class:"hover:underline"},[s("span",null,e(o),1)],8,F)):y("",!0)]))),128))])])])])]),s("section",R,[s("div",q,[s("div",I,[s("div",W,[s("div",x,[s("h4",G,e(l.trans("Details")),1),s("div",null,[s("h6",null,e(l.trans("Overview")),1),s("div",{innerHTML:l.sanitizeHtml(t.job.short_description),class:"mt-px"},null,8,K)]),s("div",null,[s("h6",null,e(l.trans("Description")),1),s("div",{innerHTML:l.sanitizeHtml(t.job.description),class:"mt-px"},null,8,P)]),s("div",null,[s("h6",null,e(l.trans("Required Skills")),1),s("ul",Q,[(i(!0),a(d,null,r(t.job.tags,n=>(i(),a("li",{key:n.id,class:"list-disc"},e(n.title),1))),128))])]),s("div",null,[s("span",U,e(l.trans("Service")),1),s("div",null,e((c=t.job.service)==null?void 0:c.title),1)]),s("div",null,[s("h6",null,e(l.trans("Categories")),1),s("ul",X,[(i(!0),a(d,null,r(t.job.categories,n=>(i(),a("li",{key:n.id,class:"list-disc"},e(n.title),1))),128))])]),s("div",Z,[s("div",null,[s("span",ss,e(l.trans("Salary")),1),s("div",null,e(t.job.salary_range)+"/"+e(t.job.salary_type.charAt(0).toLowerCase()),1)]),s("div",null,[s("span",es,e(l.trans("Expertise")),1),s("div",null,e(t.job.expertise),1)]),s("div",null,[s("span",ts,e(l.trans("Location")),1),JSON.parse(t.job.meta).is_remote?(i(),a("div",ls,e(l.trans("Remote")),1)):(i(),a("div",ns,e((h=(u=t.job.country)==null?void 0:u[0])==null?void 0:h.name)+","+e((m=t.job.state[0])==null?void 0:m.name),1))]),s("div",null,[s("span",as,e(l.trans("Job Type")),1),s("div",null,e(t.job.type),1)]),s("div",null,[s("span",is,e(l.trans("Date")),1),s("div",null,e(j(v)(t.job.updated_at).format("D MMM, YYYY")),1)]),s("div",null,[s("span",os,e(l.trans("Experience")),1),s("div",null,e(t.job.experience),1)]),s("div",null,[s("span",ds,e(l.trans("Apply Type")),1),s("div",null,e(t.job.apply_type==1?"Email":t.job.apply_type==2?"External":"Default"),1)]),s("div",null,[s("span",rs,e(l.trans("Expired Date")),1),s("div",null,e(t.job.expired_at?j(v)(t.job.expired_at).format("D MMM, YYYY"):"None"),1)])]),s("div",null,[s("h6",null,e(l.trans("Custom fields")),1),((b=JSON.parse(t.job.fields))==null?void 0:b.length)>0?(i(),a("div",cs,[(i(!0),a(d,null,r(JSON.parse(t.job.fields),(n,o)=>(i(),a("div",{key:o},[s("span",null,e(l.trans("Label"))+": "+e(n.label),1),p(),us,s("span",null,e(l.trans("Type"))+": "+e(n.type),1)]))),128))])):y("",!0)])])])])])])])])])}}});export{ys as default};
