import{Q as f}from"./QBanner.462f6fd3.js";import{Q as y}from"./QPopupProxy.c21b2b9b.js";import{_ as U,T as M,U as R,d as s,o as u,e as w,w as a,h as t,ad as r,k as $,g as d,t as n,ac as _,ag as k,j as m,f as Q,F as V,O as v}from"./index.cf09daef.js";import{Q as z}from"./QPage.17eab31b.js";import{u as c}from"./enquiry.7936b0bd.js";import{R as B,d as P}from"./mixins.6734cf6a.js";import"./QMenu.c2e9b9fc.js";import"./selection.5d5b72c0.js";import"./StateSelect.29046ffe.js";import"./index.becf6c0c.js";import"./CitySelect.44fd570a.js";import"./BaseSectionSkeleton.c10f267e.js";import"./QSkeleton.b65f9727.js";import"./page.e779678f.js";import"./QExpansionItem.c46f740a.js";import"./SkeletonSinglePage.c6d95753.js";const A={mixins:[B],data(){return{store:c(),pagination:{...P,sortBy:"last_reply",status:this.$route.meta.status}}},methods:{...M(c,["get","changeArchived","changeUserArchived"]),singleRoute(l){return{name:"Enquiry",params:{id:l.id},query:{action:"edit",title:l.subject||"Contact us"}}}},computed:{...R(c,["actions","rows","columns","module","toolbar","filters"]),getColumns(){return this.columns.filter(l=>l.guard.includes(this.guard))},getToolbar(){return this.toolbar.filter(l=>l.guard.includes(this.guard))}}},E={class:"ellipsis"},S=["innerHTML"],H=["innerHTML"];function L(l,o,j,D,b,g){const i=s("base-btn"),p=s("base-label"),h=s("base-status"),C=s("base-table"),q=s("base-section");return u(),w(z,{padding:""},{default:a(()=>[t(q,{flat:"",bordered:"","no-row":""},{default:a(()=>[t(C,{"hide-label":"",store:b.store,module:l.module,actions:l.actions,columns:g.getColumns,rows:l.rows,toolbar:g.getToolbar,filters:l.filters,loading:l.loading,pagination:b.pagination,onRequest:l.onRequest,onToolbarClicked:l.toolbarClicked,onRowClicked:l.rowClicked,"no-data-label":l.$t("enquiries.noData"),"table-key":"enquiries",selection:"multiple",selected:l.selected,"onUpdate:selected":o[4]||(o[4]=e=>l.selected=e),"grid-columns":["created_at,id,email,last_reply,status"]},{"body-cell-id":a(e=>[t(i,{onClick:o[0]||(o[0]=r(()=>{},["stop"])),link:"",tag:"a",align:"left",to:{name:"Enquiry",params:{id:e.row.id},query:{action:"edit",title:e.row.subject||l.$t("contactUs")}},style:$(e.col.style)},{default:a(()=>[d("div",E,n(e.value),1)]),_:2},1032,["to","style"]),_(t(i,{class:"q-ml-xs",size:"md",link:"",color:"black",icon:"fal fa-align-left",onClick:o[1]||(o[1]=r(()=>{},["stop"]))},{default:a(()=>[t(y,null,{default:a(()=>[t(f,{style:{width:"350px"}},{default:a(()=>[t(p,null,{default:a(()=>[m(n(l.$t("label.message")),1)]),_:1}),d("span",{innerHTML:e.row.message},null,8,S)]),_:2},1024)]),_:2},1024)]),_:2},1536),[[k,e.row.message]])]),"body-cell-name":a(e=>[e.row.user?(u(),w(i,{key:0,onClick:o[2]||(o[2]=r(()=>{},["stop"])),link:"",size:"12px",tag:"a",to:{name:"Member",params:{id:e.row.user.id},query:{action:"edit"}},label:e.value},null,8,["to","label"])):(u(),Q(V,{key:1},[m(n(e.value),1)],64))]),"body-cell-status":a(e=>[t(h,{type:e.value},null,8,["type"])]),"body-cell-is_archived":a(e=>[t(v,{"onUpdate:modelValue":T=>l.changeArchived(e.row),size:"sm",dense:"","model-value":e.row.is_archived,color:"green"},null,8,["onUpdate:modelValue","model-value"])]),"body-cell-user_archived":a(e=>[t(v,{"onUpdate:modelValue":T=>l.changeUserArchived(e.row),size:"sm",dense:"","model-value":e.row.user_archived,color:"green"},null,8,["onUpdate:modelValue","model-value"])]),"body-cell-last_reply":a(e=>[d("span",null,n(e.value),1),_(t(i,{class:"q-ml-sm",size:"md",link:"",color:"black",icon:"fal fa-align-left",onClick:o[3]||(o[3]=r(()=>{},["stop"]))},{default:a(()=>[t(y,null,{default:a(()=>[t(f,{style:{width:"350px"}},{default:a(()=>[t(p,null,{default:a(()=>[m(n(l.$t("lastMessage")),1)]),_:1}),d("span",{innerHTML:l.$core.nl2br(e.row.last_reply.message)},null,8,H)]),_:2},1024)]),_:2},1024)]),_:2},1536),[[k,e.row.last_reply]])]),_:1},8,["store","module","actions","columns","rows","toolbar","filters","loading","pagination","onRequest","onToolbarClicked","onRowClicked","no-data-label","selected"])]),_:1})]),_:1})}var oe=U(A,[["render",L]]);export{oe as default};
