import{_ as f}from"./AdminLayout.vue_vue_type_script_setup_true_lang-CE8oEe4m.js";import{d as c,q as y,c as l,o,a as r,b as e,u as i,m as $,h as d,t as a,F as g,p as b,j as u,f as h,n as k,P as m,g as w,x as _}from"./app-DJb_CRLj.js";import{_ as v}from"./SearchList.vue_vue_type_script_setup_true_lang-CyAiOusi.js";import{_ as B}from"./FilterList.vue_vue_type_script_setup_true_lang-CCLhEmVl.js";import{_ as C}from"./Pagination.vue_vue_type_script_setup_true_lang-9skHAHfw.js";import{_ as N}from"./Files.vue_vue_type_script_setup_true_lang-CRYWsXWh.js";import"./simplebar.min-CZ5saGqI.js";import"./debounce-CDPmhVE8.js";import"./useToastify-DqLaHt3f.js";import"./coloris-DdyWondq.js";/* empty css                             *//* empty css              */import"./useCopyToClipboard-CrZ6pkmz.js";import"./useRandomNum-BTw6623a.js";const V={class:"container-fluid"},q={class:"user-list list mb-4"},D={class:"card"},j={class:"card-body"},F={class:"table-responsive simplebar-container mb-4"},L={class:"table",style:{"min-width":"900px"}},P={key:0},z={key:1},E={key:2},S={class:"lts-05 fs-8"},T={key:0},A={key:1},G={key:2},H={key:0,class:"badge bg-info rounded-pill fs-7"},I={key:1,class:"badge bg-success rounded-pill fs-7"},J={key:2,class:"badge bg-dark rounded-pill fs-7"},K={class:"lts-05 fs-8"},M={key:0,class:"product-list-empty"},O={class:"lts-05"},ns=c({layout:f,__name:"List",props:{tickets:{},keyword:{}},setup(Q){return(s,n)=>{const p=y("tooltip");return o(),l(g,null,[r(i($),{title:s.$t("messages.title.ticket_list")},null,8,["title"]),e("div",V,[r(N,{title:s.$t("messages.word.tickets")},null,8,["title"]),e("div",q,[e("div",D,[e("div",j,[r(v,{keyword:s.keyword,placeholder:s.$t("messages.sentence.ticket_title")+" ..."},null,8,["keyword","placeholder"]),r(B,{filters:{waiting_admin:s.$t("messages.sentence.awaiting_answer"),waiting_user:s.$t("messages.word.answered"),closed:s.$t("messages.word.closed"),users:s.$t("messages.word.users"),sellers:s.$t("messages.word.sellers")}},null,8,["filters"]),e("div",F,[e("table",L,[e("thead",null,[e("tr",null,[e("th",null,a(s.$t("messages.word.title")),1),e("th",null,a(s.$t("messages.word.user")),1),e("th",null,a(s.$t("messages.sentence.user_type")),1),e("th",null,a(s.$t("messages.word.priority")),1),e("th",null,a(s.$t("messages.word.status")),1),e("th",null,a(s.$t("messages.word.last_update")),1),n[0]||(n[0]=e("th",{class:"first-small"},[e("i",{class:"ri-settings-4-line"})],-1))])]),e("tbody",null,[(o(!0),l(g,null,b(s.tickets.data,t=>(o(),l("tr",{key:t.id},[e("td",null,[r(i(m),{href:s.route("admin.tickets.show",t.id),class:k({link:!0,"fw-normal":t.status=="waiting_user"||t.status=="closed"})},{default:u(()=>[h(a(t.title),1)]),_:2},1032,["href","class"])]),e("td",null,[r(i(m),{href:s.route("admin.users.show",t.user_id),class:"link fw-normal"},{default:u(()=>[h(a(t.user.get_name),1)]),_:2},1032,["href"])]),e("td",null,[t.user.type=="admin"?(o(),l("span",P,a(s.$t("messages.word.admin")),1)):t.user.seller?(o(),l("span",z,a(s.$t("messages.word.seller")),1)):t.user.type=="user"?(o(),l("span",E,a(s.$t("messages.word.user")),1)):d("",!0)]),e("td",S,[t.priority=="high"?(o(),l("span",T,a(s.$t("messages.word.high")),1)):t.priority=="normal"?(o(),l("span",A,a(s.$t("messages.word.average")),1)):t.priority=="low"?(o(),l("span",G,a(s.$t("messages.word.low")),1)):d("",!0)]),e("td",null,[t.status=="waiting_admin"?(o(),l("span",H,a(s.$t("messages.sentence.awaiting_answer")),1)):t.status=="waiting_user"?(o(),l("span",I,a(s.$t("messages.word.answered")),1)):t.status=="closed"?(o(),l("span",J,a(s.$t("messages.word.closed")),1)):d("",!0)]),e("td",K,a(t.jalali_updated_at[3]),1),e("td",null,[t.status!="closed"?w((o(),_(i(m),{key:0,href:s.route("admin.tickets.destroy",t.id),as:"button",method:"delete",class:"btn btn-dark btn-square btn-xs"},{default:u(()=>n[1]||(n[1]=[e("i",{class:"ri-lock-line"},null,-1)])),_:2},1032,["href"])),[[p,s.$t("messages.word.close"),void 0,{top:!0}]]):t.status=="closed"?w((o(),_(i(m),{key:1,href:s.route("admin.tickets.destroy",t.id),as:"button",method:"delete",class:"btn btn-success btn-square btn-xs"},{default:u(()=>n[2]||(n[2]=[e("i",{class:"ri-lock-unlock-line"},null,-1)])),_:2},1032,["href"])),[[p,s.$t("messages.word.open"),void 0,{top:!0}]]):d("",!0)])]))),128))])])]),s.tickets.data.length==0?(o(),l("div",M,[e("div",O,a(s.$t("messages.sentence.no_items_found")),1)])):d("",!0),r(C,{links:s.tickets.links},null,8,["links"])])])])])],64)}}});export{ns as default};
