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