import{_}from"./DomainEntityNav.05a2f50d.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 g,_ as w,o as x,c as F,a as s,d as N,t as R,b as u,A as $}from"./entry.c7cd0af6.js";import{u as k}from"./api.45358b0b.js";import{i as T}from"./utils.1db1ba01.js";import"./index.20c05cdd.js";import{u as U}from"./object.62d64729.js";import"./nuxt-link.40687dc5.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}=g(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=w(A,[["render",E]]);export{Q as default};
