import{_ as g}from"./SmartDataTable-2Nc3Ohem.js";import{d as r,f as s,h as l,i,D as _,y as n,x as v,c as y,O as b,H as f,P as h,a1 as w}from"./index-C5GbdPxY.js";import{V as u}from"./VChip-CsS_5IS6.js";import{V as T}from"./VTooltip-DPhSY2Qe.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"./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"./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"./RoleBadge.vue_vue_type_script_setup_true_lang-Ctl8Qye7.js";import"./VDataTable-BFiF8jPV.js";import"./VTable-M43pjJD_.js";import"./filter-DERJvhSS.js";const V=r({__name:"TableBadge",props:{item:{},itemKey:{},color:{}},setup(a){return(t,e)=>(l(),s(u,{color:t.color||"primary",size:"small"},{default:i(()=>[_(n(t.item[t.itemKey]),1)]),_:1},8,["color"]))}}),k=r({__name:"TableEvent",props:{item:{},color:{}},setup(a){const t=a,e=()=>{switch(t.item.event_key){case"created":return"success";case"updated":return"warning";case"deleted":return"error";default:return"primary"}};return(o,c)=>{const m=V;return l(),s(m,{color:e(),item:o.item,"item-key":"event"},null,8,["color","item"])}}}),B=r({__name:"TableLogName",props:{item:{}},setup(a){return(t,e)=>(l(),s(T,{location:"top"},{activator:i(({props:o})=>[y(u,b({color:"info",size:"small"},o),{default:i(()=>[_(n(t.item.log_name),1)]),_:2},1040)]),default:i(()=>[v("span",null,n(t.item.description),1)]),_:1}))}}),rt=r({__name:"Index",setup(a){const{t}=f(),{can:e}=h(),o=[{title:t("admin::admin.table.user"),value:"user"},{title:t("activitylog::activity_logs.table.ip"),value:"ip"},{title:t("admin::admin.table.agent"),value:"agent"},{title:t("activitylog::activity_logs.table.log_name"),value:"log_name",sortable:!0},{title:t("activitylog::activity_logs.table.event"),value:"event",sortable:!0},{title:t("activitylog::activity_logs.table.subject"),value:"subject",sortable:!0},{title:t("activitylog::activity_logs.table.logged_at"),value:"created_at",sortable:!0}],c=(m,p)=>{e("admin.activity_logs.show")&&w.push({name:"admin.activity_logs.show",params:{id:p.item.id}})};return(m,p)=>{const d=g;return l(),s(d,{"api-uri":"/v1/activity-logs","cell-components":{log_name:{component:B},event:{component:k,props:{color:"secondary"}}},"has-search":!1,headers:o,module:"activitylog",name:"activity_log","on-row-click":c,resource:"activity_logs"},null,8,["cell-components"])}}});export{rt as default};
