import{_}from"./DomainEntityNav.b582554d.js";import{f,B as h,n as y,k as v,q as d,s as m,v as p,x as b,y as g,_ as w,o as x,c as F,a as s,d as N,t as R,b as u,z as $}from"./entry.cc52a3f2.js";import{u as k}from"./api.8d75df99.js";import{i as B}from"./utils.65cfe9e7.js";import"./index.20c05cdd.js";import{u as T}from"./object.62d64729.js";import"./nuxt-link.83112a4b.js";const U=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}=g(i);if(!B(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."}),T(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),A=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),A]),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=w(U,[["render",E]]);export{Q as default};
