import{_}from"./MainLayout.vue_vue_type_script_setup_true_lang-BhXhRXha.js";import{d as g,c as n,o,a as l,b as e,u as r,m as h,h as i,n as w,f as d,t,j as p,P as c,F as u,r as f,E as y}from"./app-BidmlC59.js";import{_ as $}from"./SearchList.vue_vue_type_script_setup_true_lang-Mz6dy287.js";import{_ as k}from"./FilterList.vue_vue_type_script_setup_true_lang-5e2WMwAc.js";import{_ as b}from"./Pagination.vue_vue_type_script_setup_true_lang-DQBGGaaV.js";import"./simplebar.min-hRaQJumN.js";/* empty css                             *//* empty css                          *//* empty css            */import"./useToastify-Bhe2cyz3.js";import"./AdminNavigation.vue_vue_type_script_setup_true_lang-Cv8qtxCX.js";import"./useHexToRgb-Crf73LpK.js";import"./useRandomStr-7r5tQ8Eq.js";const v={class:"card shadow-1 panel-content"},B={class:"card-body"},C={class:"panel-content--title panel-content--title-with-button mb-4 lts-05"},N={class:"ticket-list mb-3"},V={class:"table-responsive simplebar-container"},j={class:"table",style:{"min-width":"900px"}},E={class:"lts-05 fs-8"},F={key:0},L={key:1},P={key:2},z={class:"lts-05 fs-8"},D={key:0,class:"badge bg-info rounded-pill fs-7"},S={key:1,class:"badge bg-success rounded-pill fs-7"},T={key:2,class:"badge bg-dark rounded-pill fs-7"},U={key:0,class:"cart-empty"},q={class:"empty-content-icon"},A=["src"],G={class:"empty-content-message text-center"},H={class:"mb-4 lts-05 fs-8"},ts=g({layout:_,__name:"List",props:{tickets:{},keyword:{}},setup(I){return(s,m)=>(o(),n(u,null,[l(r(h),{title:s.$t("messages.title.ticket_list")},null,8,["title"]),e("div",v,[e("div",B,[e("div",C,[d(t(s.$t("messages.word.tickets"))+" ",1),l(r(c),{href:s.route("user.tickets.create"),class:"btn btn-primary shadow-1 lts-05 px-4"},{default:p(()=>[d(t(s.$t("messages.sentence.create_new_ticket"))+" ",1),m[0]||(m[0]=e("i",{class:"ri-send-plane-2-line ms-2"},null,-1))]),_:1},8,["href"])]),e("div",N,[l($,{keyword:s.keyword,placeholder:s.$t("messages.sentence.ticket_title")+" ..."},null,8,["keyword","placeholder"]),l(k,{filters:{waiting_admin:s.$t("messages.sentence.awaiting_answer"),waiting_user:s.$t("messages.word.answered"),closed:s.$t("messages.word.closed")}},null,8,["filters"]),e("div",V,[e("table",j,[e("thead",null,[e("tr",null,[e("th",null,t(s.$t("messages.word.title")),1),e("th",null,t(s.$t("messages.word.priority")),1),e("th",null,t(s.$t("messages.word.last_update")),1),e("th",null,t(s.$t("messages.word.status")),1)])]),e("tbody",null,[(o(!0),n(u,null,f(s.tickets.data,a=>(o(),n("tr",{key:a.id},[e("td",null,[l(r(c),{href:s.route("user.tickets.show",a.id),class:y({link:!0,"fw-normal":a.status=="waiting_admin"||a.status=="closed"})},{default:p(()=>[d(t(a.title),1)]),_:2},1032,["href","class"])]),e("td",E,[a.priority=="high"?(o(),n("span",F,t(s.$t("messages.word.high")),1)):a.priority=="normal"?(o(),n("span",L,t(s.$t("messages.word.average")),1)):a.priority=="low"?(o(),n("span",P,t(s.$t("messages.word.low")),1)):i("",!0)]),e("td",z,t(a.jalali_updated_at[3]),1),e("td",null,[a.status=="waiting_admin"?(o(),n("span",D,t(s.$t("messages.sentence.awaiting_answer")),1)):a.status=="waiting_user"?(o(),n("span",S,t(s.$t("messages.word.answered")),1)):a.status=="closed"?(o(),n("span",T,t(s.$t("messages.word.closed")),1)):i("",!0)])]))),128))])])])]),s.tickets.data.length==0?(o(),n("div",U,[e("div",q,[e("img",{src:s.$page.props.appUrl+"/img/template/orders.svg"},null,8,A)]),e("div",G,[e("p",H,t(s.$t("messages.sentence.no_items_found")),1)])])):i("",!0),s.tickets.data.length!=0?(o(),w(b,{key:1,links:s.tickets.links},null,8,["links"])):i("",!0)])])],64))}});export{ts as default};
