import{_}from"./DomainEntityNav.240e6258.js";import{f,n as h,q as y,k as v,s as d,v as m,x as p,y as b,z as w,_ as g,o as x,c as F,a as s,d as N,t as R,b as u,A as $}from"./entry.27446522.js";import{u as k}from"./api.c7538068.js";import{i as T}from"./utils.23d0a223.js";import"./index.d6a55bd5.js";import{u as U}from"./object.62d64729.js";import"./nuxt-link.3625b369.js";const A=f({async setup(){let e,t;const l=[{name:"General",icon:"fas fa-bars",urlSuffix:""},{name:"Roles",icon:"fa-solid fa-theater-masks",urlSuffix:"roles"}],n=h(),c=y(),a=v(null);try{a.value=([e,t]=d(()=>k().identityProvider.getOne(c.params.id)),e=await e,t(),e)}catch{throw[e,t]=d(()=>m({path:"/admin/identity-providers"})),await e,t(),p({})}const i=b(),{realmManagement:r}=w(i);if(!T(r.value,a.value.realm_id))throw[e,t]=d(()=>m({path:"/admin/identity-providers"})),await e,t(),p({});return{entity:a,items:l,handleUpdated:o=>{n.success({body:"The identity-provider was successfully updated."}),U(a,o)},handleFailed:o=>{n.warning({body:o.message})}}}},"$oziQrTrFR9"),P={class:"title no-border mb-3"},S=s("i",{class:"fa-solid fa-atom me-1"},null,-1),B=s("span",{class:"sub-title ms-1"},"Details",-1),D={class:"mb-2"};function E(e,t,l,n,c,a){const i=_,r=$;return x(),F("div",null,[s("h1",P,[S,N(" "+R(e.entity.name)+" ",1),B]),s("div",D,[u(i,{path:"/admin/identity-providers/"+e.entity.id,items:e.items,"prev-link":!0},null,8,["path","items"])]),s("div",null,[u(r,{entity:e.entity,onUpdated:e.handleUpdated,onFailed:e.handleFailed},null,8,["entity","onUpdated","onFailed"])])])}const Q=g(A,[["render",E]]);export{Q as default};
