import{_ as C}from"./nuxt-link.f01z1rl7.js";import{f as D,D as P,h as x,C as g,E as R,L as T,F as k,M as v,y as E,z as I,P as p,_ as V,r as n,o as B,g as N,w as o,b as a,a as $}from"./entry.eQZ3auYG.js";import{i as q}from"./utils.kGqDb192.js";const w=D({components:{ATitle:P,APagination:x,ASearch:g,BTable:R,AIdentityProviders:T,AEntityDelete:k,VCTimeago:v},emits:["deleted"],setup(t,{emit:u}){const _=l=>{u("deleted",l)},i=E(),{realm:b,realmManagementId:y}=I(i),r={filter:{realm_id:[y.value,null]}},m=l=>q(b.value,l.realm_id),c=i.has(p.PROVIDER_EDIT),d=i.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,_,i,b,y){const r=n("ATitle"),m=n("ASearch"),c=n("APagination"),d=n("VCTimeago"),f=C,l=n("AEntityDelete"),h=n("BTable"),A=n("AIdentityProviders");return B(),N(A,{query:t.query,onDeleted:t.handleDeleted},{header:o(e=>[a(r),a(m,{load:e.load,busy:e.busy},null,8,["load","busy"])]),footer:o(e=>[a(c,{busy:e.busy,meta:e.meta,load:e.load},null,8,["busy","meta","load"])]),body:o(e=>[a(h,{items:e.data,fields:t.fields,busy:e.busy,"head-variant":"'dark'",outlined:""},{"cell(created_at)":o(s=>[a(d,{datetime:s.item.created_at},null,8,["datetime"])]),"cell(updated_at)":o(s=>[a(d,{datetime:s.item.created_at},null,8,["datetime"])]),"cell(options)":o(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:o(()=>[O]),_:2},1032,["to","disabled"]),a(l,{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=V(w,[["render",S]]);export{j as default};
