import{_ as v,T as w,U as y,d as s,o as m,e as u,w as a,h as t,g as C,n as k,ad as _,j as h,t as R,i as q,ae as M}from"./index.cf09daef.js";import{Q as V}from"./QPage.17eab31b.js";import{u as l}from"./member.21f498a7.js";import{R as z,d as A}from"./mixins.6734cf6a.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"./QMenu.c2e9b9fc.js";import"./selection.5d5b72c0.js";import"./SkeletonSinglePage.c6d95753.js";const T={mixins:[z],data(){return{store:l(),pagination:{...A,sortBy:"id",includes:["lastUpdate.admin"],override:["includes"]}}},methods:{...w(l,["get","changeActive"]),singleRoute(e){return{name:"Member",params:{id:e.id},query:{action:"edit",title:e.name}}}},computed:{...y(l,["actions","rows","columns","module","toolbar","filters"]),visibleColumns(){return this.columns.filter(e=>e.status&&e.status.includes(this.pagination.status)||!e.status).map(e=>e.name)}}};function U(e,n,B,N,r,c){const p=s("base-avatar"),b=s("base-btn"),d=s("base-status"),g=s("base-table"),f=s("base-section");return m(),u(V,{padding:""},{default:a(()=>[t(f,{flat:"",bordered:"","no-row":""},{default:a(()=>[t(g,{store:r.store,module:e.module,columns:e.columns,rows:e.rows,actions:e.actions,toolbar:e.toolbar,filters:e.filters,loading:e.loading,pagination:r.pagination,onRequest:e.onRequest,onActionClicked:e.actionClicked,onToolbarClicked:e.toolbarClicked,onRowClicked:e.rowClicked,"no-data-label":e.$t("members.noData"),"visible-columns":c.visibleColumns,"table-key":"members",selection:"multiple",selected:e.selected,"onUpdate:selected":n[1]||(n[1]=o=>e.selected=o),"hide-label":"","grid-columns":["avatar","id,name,email,status"]},{"body-cell-avatar":a(o=>[t(p,{rounded:"",class:"cursor-pointer",user:o.row,size:"40px"},null,8,["user"])]),"body-cell-name":a(o=>[C("i",{class:k(`q-mr-sm q-icon fas fa-circle rag-${o.row.rag||"white"}`),style:{"font-size":"8px"},"aria-hidden":"true",role:"presentation"},null,2),t(b,{onClick:n[0]||(n[0]=_(()=>{},["stop"])),link:"",size:"12px",tag:"a",to:{name:"Member",params:{id:o.row.id},query:{action:"edit"}}},{default:a(()=>[h(R(o.value),1)]),_:2},1032,["to"])]),"body-cell-subscription":a(o=>{var i;return[o.value?(m(),u(d,{key:0,type:(i=o.value)==null?void 0:i.stripe_status},null,8,["type"])):q("",!0)]}),"body-cell-status":a(o=>[t(d,{type:o.value},null,8,["type"])]),"body-cell-is_active":a(o=>[t(M,{"onUpdate:modelValue":i=>e.changeActive(o.row),size:"sm",dense:"","model-value":o.row.is_active,color:"green"},null,8,["onUpdate:modelValue","model-value"])]),_:1},8,["store","module","columns","rows","actions","toolbar","filters","loading","pagination","onRequest","onActionClicked","onToolbarClicked","onRowClicked","no-data-label","visible-columns","selected"])]),_:1})]),_:1})}var O=v(T,[["render",U]]);export{O as default};
