import{m as x,K as y,o as _,h as c,f as e,e as t,k as r,t as s,b as h,c as $,F as k,d as v,u as d,l as o,a as i}from"./app-43851608.js";/* empty css              */import{_ as T}from"./Table-69702a89.js";import{T as B,a as N,_ as f}from"./TableHeaderRowItem-459897e8.js";import{T as L,a as V,_ as n}from"./TableBodyRowItem-110be769.js";const j={class:"py-1 px-2 bg-gray-50 rounded-[5px] border border-dashed w-[20em] truncate text-xs capitalize"},z={class:"text-left bg-slate-100 py-2 px-3 rounded-xl text-[11px]"},C={class:"text-left"},R={class:"text-left"},S={class:"py-1 rounded-[5px] text-xs px-3 bg-[#ddebf7] text-slate-700"},F={class:"flex items-center mt-3"},H=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[i("path",{fill:"currentColor","fill-rule":"evenodd",d:"M9.97 7.47a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 1 1-1.06-1.06L13.44 12L9.97 8.53a.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"})],-1),M={__name:"TicketTable",props:{rows:{type:Object,required:!0}},setup(b){const p=x(()=>y().props.auth.user),u=l=>y().props.auth.user.role!="user"?"/admin/support/"+l:"/support/"+l;return(l,U)=>(_(),c(T,{rows:b.rows},{default:e(()=>[t(B,null,{default:e(()=>[t(N,null,{default:e(()=>[t(f,{position:"first"},{default:e(()=>[r(s(l.$t("Ref")),1)]),_:1}),t(f,null,{default:e(()=>[r(s(l.$t("Subject")),1)]),_:1}),t(f,null,{default:e(()=>[r(s(l.$t("Priority")),1)]),_:1}),p.value.role!="user"?(_(),c(f,{key:0},{default:e(()=>[r(s(l.$t("User")),1)]),_:1})):h("",!0),p.value.role!="user"?(_(),c(f,{key:1},{default:e(()=>[r(s(l.$t("Assigned to")),1)]),_:1})):h("",!0),t(f,null,{default:e(()=>[r(s(l.$t("Status")),1)]),_:1}),t(f,null,{default:e(()=>[r(s(l.$t("Last updated")),1)]),_:1}),t(f,{position:"last"})]),_:1})]),_:1}),t(L,null,{default:e(()=>[(_(!0),$(k,null,v(b.rows.data,(a,g)=>(_(),c(V,{key:g},{default:e(()=>[t(n,{position:"first",class:"capitalize"},{default:e(()=>[t(d(o),{href:u(a.uuid)},{default:e(()=>[r(s(a.reference),1)]),_:2},1032,["href"])]),_:2},1024),t(n,{class:"hidden sm:table-cell"},{default:e(()=>[t(d(o),{href:u(a.uuid)},{default:e(()=>[i("div",j,s(a.subject),1)]),_:2},1032,["href"])]),_:2},1024),t(n,{class:"hidden sm:table-cell"},{default:e(()=>[t(d(o),{href:u(a.uuid)},{default:e(()=>[i("span",z,s(a.priority??l.$t("Not set")),1)]),_:2},1032,["href"])]),_:2},1024),p.value.role!="user"?(_(),c(n,{key:0,class:"hidden sm:table-cell"},{default:e(()=>[t(d(o),{href:u(a.uuid)},{default:e(()=>[i("span",C,s(a.user.first_name+" "+a.user.last_name),1)]),_:2},1032,["href"])]),_:2},1024)):h("",!0),p.value.role!="user"?(_(),c(n,{key:1,class:"hidden sm:table-cell"},{default:e(()=>[t(d(o),{href:u(a.uuid)},{default:e(()=>{var m,w;return[i("span",R,s(a.agent?((m=a.agent)==null?void 0:m.first_name)+" "+((w=a.agent)==null?void 0:w.last_name):l.$t("Not set")),1)]}),_:2},1032,["href"])]),_:2},1024)):h("",!0),t(n,{class:"capitalize"},{default:e(()=>[t(d(o),{href:u(a.uuid)},{default:e(()=>[i("span",S,s(l.$t(a.status)),1)]),_:2},1032,["href"])]),_:2},1024),t(n,{class:"hidden sm:table-cell"},{default:e(()=>[t(d(o),{href:u(a.uuid)},{default:e(()=>[r(s(a.updated_at),1)]),_:2},1032,["href"])]),_:2},1024),t(n,{position:"last"},{default:e(()=>[i("div",F,[t(d(o),{href:u(a.uuid)},{default:e(()=>[H]),_:2},1032,["href"])])]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1},8,["rows"]))}};export{M as _};
