import{_}from"./SmartDataTable-2Nc3Ohem.js";import{d as n,C as u,h as s,x as a,D as b,c as f,y as i,H as h,P as v,f as g}from"./index-C5GbdPxY.js";import{_ as x}from"./RoleBadge.vue_vue_type_script_setup_true_lang-Ctl8Qye7.js";import"./VAvatar-RkAR0u0e.js";import"./VImg-BlqLjeEy.js";import"./VSelect-vtfYszIh.js";import"./VTextField-DxEUpn3-.js";import"./index-XcTykuv2.js";import"./forwardRefs-CB8NoG9r.js";import"./VList-C3dIUnee.js";import"./VMenu-CT0Fri-T.js";import"./VOverlay-DlJb3QlW.js";import"./getScrollParent-DE35ecf2.js";import"./VVirtualScroll-BUlcGoHW.js";import"./VChip-CsS_5IS6.js";import"./confirmDialog-CDDTmj30.js";import"./VCard-DptrO3GI.js";import"./VDialog-Dr29crN8.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./lodash-kem28dbC.js";import"./_commonjsHelpers-_d1bhYXs.js";import"./VForm-BZc3SavJ.js";import"./VCheckbox-rNAD_QU_.js";import"./VDatePicker-DHBX-k2T.js";import"./VSpacer-79sITyKz.js";import"./VBadge-DZHesqMo.js";import"./VTooltip-DPhSY2Qe.js";import"./TableAgent.vue_vue_type_script_setup_true_lang-XA6R7TPe.js";import"./TableEnum.vue_vue_type_script_setup_true_lang-5ITYgflT.js";import"./TableStatus.vue_vue_type_script_setup_true_lang-BRbfAU0T.js";import"./VDataTable-BFiF8jPV.js";import"./VTable-M43pjJD_.js";import"./filter-DERJvhSS.js";const k={class:"d-flex align-center gap-3 pa-2"},y={class:"d-flex flex-column"},B={class:"font-weight-bold"},T={class:"text-caption"},N=n({__name:"TableName",props:{item:{}},setup(m){return(e,t)=>{const o=x;return s(),u("div",k,[a("div",y,[a("div",B,[b(i(e.item.name)+" - ",1),f(o,{role:e.item.role},null,8,["role"])]),a("div",T," @"+i(e.item.username),1)])])}}}),ne=n({__name:"Index",setup(m){const{t:e}=h(),{user:t}=v(),o=[{title:e("user::users.table.name"),value:"name",sortable:!0},{title:e("branch::branches.table.branch"),value:"branch.name",sortable_key:"branch_id",sortable:!0,hidden:t==null?void 0:t.assigned_to_branch},{title:e("user::users.table.email"),value:"email",sortable:!0},{title:e("admin::admin.table.status"),value:"is_active",sortable:!1},{title:e("admin::admin.table.created_at"),value:"created_at",sortable:!0},{title:e("admin::admin.table.updated_at"),value:"updated_at",sortable:!0}],c=[{key:"edit"},{key:"destroy",hidden:r=>r.is_main_user,confirm:{message:e("admin::admin.delete.confirmation_message"),confirmButtonText:e("admin::admin.delete.confirm_button_text")}}],l={name:{component:N}},p=[{key:"destroy",confirm:{message:e("admin::admin.delete.confirmation_message"),confirmButtonText:e("admin::admin.delete.confirm_button_text")}}];return(r,C)=>{const d=_;return s(),g(d,{actions:c,"api-uri":"/v1/users","bulk-actions":p,"cell-components":l,"header-actions":[{key:"create"}],headers:o,module:"user",name:"user",resource:"users"})}}});export{ne as default};
