import{_ as L}from"./nuxt-link.3625b369.js";import{f as T,D as x,L as C,B as R,W as k,ak as B,E as P,T as g,r as o,y as E,z as v,P as p,_ as N,o as W,g as O,w as l,b as a,a as S}from"./entry.27446522.js";import{i as $}from"./utils.23d0a223.js";const q=T({components:{ListTitle:x,ListPagination:C,ListSearch:R,BTable:k,RobotList:B,EntityDelete:P,Timeago:g},emits:["deleted"],setup(t,{emit:u}){o("RobotList");const b=i=>{u("deleted",i)},n=E(),{realm:_,realmManagementId:f}=v(n),r={filter:{realm_id:[f.value,null]}},m=i=>$(_.value,i.realm_id),c=n.has(p.ROBOT_EDIT),d=n.has(p.ROBOT_DROP);return{fields:[{key:"id",label:"ID",thClass:"text-left",tdClass:"text-left"},{key:"name",label:"Name",thClass:"text-left",tdClass:"text-left"},{key:"created_at",label:"Created At",thClass:"text-center",tdClass:"text-center"},{key:"updated_at",label:"Updated At",thClass:"text-left",tdClass:"text-left"},{key:"options",label:"",tdClass:"text-left"}],isResourceWritable:m,hasEditPermission:c,hasDropPermission:d,handleDeleted:b,query:r}}},"$BvVi91SvH5"),w=S("i",{class:"fa-solid fa-bars"},null,-1);function A(t,u,b,n,_,f){const r=o("ListTitle"),m=o("ListSearch"),c=o("ListPagination"),d=o("Timeago"),y=L,i=o("EntityDelete"),h=o("BTable"),D=o("RobotList");return W(),O(D,{query:t.query,onDeleted:t.handleDeleted},{header:l(e=>[a(r),a(m,{load:e.load,busy:e.busy},null,8,["load","busy"])]),footer:l(e=>[a(c,{busy:e.busy,meta:e.meta,load:e.load},null,8,["busy","meta","load"])]),body:l(e=>[a(h,{items:e.data,fields:t.fields,busy:e.busy,"head-variant":"'dark'",outlined:""},{"cell(created_at)":l(s=>[a(d,{datetime:s.item.created_at},null,8,["datetime"])]),"cell(updated_at)":l(s=>[a(d,{datetime:s.item.created_at},null,8,["datetime"])]),"cell(options)":l(s=>[a(y,{to:"/admin/robots/"+s.item.id,class:"btn btn-xs btn-outline-primary me-1",disabled:!t.hasEditPermission||!t.isResourceWritable(s.item)},{default:l(()=>[w]),_:2},1032,["to","disabled"]),a(i,{class:"btn btn-xs btn-outline-danger","entity-id":s.item.id,"entity-type":"robot","with-text":!1,disabled:!t.hasDropPermission||!t.isResourceWritable(s.item),onDeleted:e.deleted},null,8,["entity-id","disabled","onDeleted"])]),_:2},1032,["items","fields","busy"])]),_:1},8,["query","onDeleted"])}const H=N(q,[["render",A]]);export{H as default};
