import{h as m}from"./moment-a9aaa855.js";import{_ as f}from"./Filter-ccd66554.js";import{_ as h}from"./NoDataFound-bc81d7fa.js";import b from"./OverviewGrid-21ea6fc2.js";import{_ as g}from"./Paginate-f61b79b2.js";import{s as k,h as x,c as i,a as c,b as t,t as s,u as a,F as S,r as C,i as u,e as y,g as v,o as l,p as o,n as w,j as $,k as j}from"./app-13978987.js";import{_ as N}from"./PageHeader-8c638686.js";import{_ as T}from"./UserLayout-6a50516d.js";import"./dropdown-45d66330.js";const V={class:"container flex-grow p-4 sm:p-6"},q={class:"space-y-6"},B={class:"table-responsive whitespace-nowrap rounded-primary"},Y={class:"table"},D={class:"text-end"},L={key:0},M={class:"text-center"},O=["href"],E={class:"text-center"},F={class:"text-center"},z={class:"flex justify-end"},A=v({layout:T}),Z=Object.assign(A,{__name:"Index",props:["buttons","request","supports","pendingSupport","openSupport","closedSupport","totalSupports","type"],setup(n){const{textExcerpt:d}=k(),r=n,p=[{value:r.totalSupports,title:"Total Supports",iconClass:"bx:support"},{value:r.pendingSupport,title:"Pending Supports",iconClass:"bx:revision"},{value:r.openSupport,title:"Open Supports",iconClass:"bx:folder-open"},{value:r.closedSupport,title:"Closed Supports",iconClass:"bx:window-close"}];return(I,P)=>{const _=x("Link");return l(),i("main",V,[c(N,{title:"Supports",buttons:n.buttons},null,8,["buttons"]),t("div",q,[c(b,{items:p}),c(f,{request:n.request,filterType:"support"},null,8,["request"]),t("div",B,[t("table",Y,[t("thead",null,[t("tr",null,[t("th",null,s(a(o)("Ticket No")),1),t("th",null,s(a(o)("Subject")),1),t("th",null,s(a(o)("Conversations")),1),t("th",null,s(a(o)("Status")),1),t("th",null,s(a(o)("Created At")),1),t("th",null,[t("p",D,s(a(o)("Ticket")),1)])])]),n.supports.total?(l(),i("tbody",L,[(l(!0),i(S,null,C(n.supports.data,e=>(l(),i("tr",{key:e.id},[t("td",M,s(e.ticket_no),1),t("td",null,[t("a",{class:"text-dark",href:"/user/supports/"+e.id},s(a(d)(e.subject,50)),9,O)]),t("td",E,s(e.conversations_count),1),t("td",null,[t("span",{class:w(e.status==2?"badge badge-warning":e.status==1?"badge badge-success":"badge badge-danger")},s(a(o)(e.status==2?"pending":e.status==1?"Open":"Closed")),3)]),t("td",F,s(a(m)(e.created_at).format("DD MMM, YYYY")),1),t("td",null,[t("div",z,[c(_,{href:"/user/supports/"+e.id,class:"btn btn-primary btn-sm"},{default:$(()=>[j(s(a(o)("View")),1)]),_:2},1032,["href"])])])]))),128))])):(l(),u(h,{key:1,"for-table":"true"}))]),n.supports.data.length!=0?(l(),u(g,{key:0,links:n.supports.links},null,8,["links"])):y("",!0)])])])}}});export{Z as default};
