import{_ as P}from"./nuxt-link.3625b369.js";import{f as L,D as x,L as C,B as T,W as R,M as g,E as k,T as v,y as E,z as I,P as p,_ as B,r as i,o as N,g as W,w as n,b as a,a as $}from"./entry.27446522.js";import{i as q}from"./utils.23d0a223.js";const w=L({components:{ListTitle:x,ListPagination:C,ListSearch:T,BTable:R,IdentityProviderList:g,EntityDelete:k,Timeago:v},emits:["deleted"],setup(t,{emit:u}){const _=o=>{u("deleted",o)},l=E(),{realm:b,realmManagementId:y}=I(l),r={filter:{realm_id:[y.value,null]}},m=o=>q(b.value,o.realm_id),c=l.has(p.PROVIDER_EDIT),d=l.has(p.PROVIDER_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:_,query:r}}},"$kXQjgiO3wY"),O=$("i",{class:"fa-solid fa-bars"},null,-1);function S(t,u,_,l,b,y){const r=i("ListTitle"),m=i("ListSearch"),c=i("ListPagination"),d=i("Timeago"),f=P,o=i("EntityDelete"),h=i("BTable"),D=i("IdentityProviderList");return N(),W(D,{query:t.query,onDeleted:t.handleDeleted},{header:n(e=>[a(r),a(m,{load:e.load,busy:e.busy},null,8,["load","busy"])]),footer:n(e=>[a(c,{busy:e.busy,meta:e.meta,load:e.load},null,8,["busy","meta","load"])]),body:n(e=>[a(h,{items:e.data,fields:t.fields,busy:e.busy,"head-variant":"'dark'",outlined:""},{"cell(created_at)":n(s=>[a(d,{datetime:s.item.created_at},null,8,["datetime"])]),"cell(updated_at)":n(s=>[a(d,{datetime:s.item.created_at},null,8,["datetime"])]),"cell(options)":n(s=>[a(f,{to:"/admin/identity-providers/"+s.item.id,class:"btn btn-xs btn-outline-primary me-1",disabled:!t.hasEditPermission||!t.isResourceWritable(s.item)},{default:n(()=>[O]),_:2},1032,["to","disabled"]),a(o,{class:"btn btn-xs btn-outline-danger","entity-id":s.item.id,"entity-type":"identityProvider","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 j=B(w,[["render",S]]);export{j as default};
