import{a as w}from"./Z4eZ-m2s.js";import{O as b,j as y,d as C,w as B,m as o,o as r,b as e,c as l,t,F as L,g as N,D as P,e as d,E as m}from"./Bgmy51Qv.js";import{u as S}from"./BE7GDBwC.js";import{u as v}from"./CYl1ofbh.js";import"./7pZkuj9N.js";import"./BHvLfWtM.js";import"./hSbGpNHU.js";import"./DuhDFJjj.js";import"./ByXs6QR-.js";import"./D_7E8SMU.js";import"./DKgjlGGV.js";const F={class:"lite-bold"},M={class:"mx-w-300x"},U={class:"mx-w-300x"},D=["onClick"],E=["onClick"],K={__name:"index",setup(I){const{t:n}=b(),p=y({created_at:{title:n("category.date")},name:{title:n("user.name")},email:{title:n("fSale.email")},replied:{title:n("setting.replied")},viewed:{title:n("setting.viewed")}}),{getFeatured:c}=S(),{listPageRef:u,editNode:g,deleteNode:f}=v();return(s,i)=>{const _=w;return r(),C(_,{ref_key:"listPageRef",ref:u,"list-api":"getUserMessages","delete-api":"deleteUserMessage","route-name":"user-messages",name:s.$t("profile.umLower"),gate:"message","add-button":!1,"order-options":o(p)},{table:B(({list:h})=>[e("tr",F,[e("th",null,t(s.$t("user.name")),1),e("th",null,t(s.$t("fSale.email")),1),e("th",null,t(s.$t("setting.replied")),1),e("th",null,t(s.$t("category.created")),1),i[0]||(i[0]=e("th",null," ",-1))]),(r(!0),l(L,null,N(h,(a,k)=>(r(),l("tr",{key:k},[e("td",null,[e("span",M,t(a.name),1)]),e("td",null,[e("span",U,t(a.email),1)]),e("td",{class:P(["status",{active:parseInt(a.replied)===1}])},[e("span",null,t(o(c)(a.replied)),1)],2),e("td",null,t(a.created),1),e("td",null,[s.$can("message","view")?(r(),l("button",{key:0,onClick:m($=>o(g)(a),["prevent"]),class:"lite-btn"},t(s.$t("fSale.view")),9,D)):d("",!0),s.$can("message","delete")?(r(),l("button",{key:1,onClick:m($=>o(f)(a),["prevent"]),class:"delete-btn lite-btn"},t(s.$t("category.delete")),9,E)):d("",!0)])]))),128))]),_:1},8,["name","order-options"])}}};export{K as default};
