import{_}from"./DomainEntityNav.WTBtLm35.js";import{f,q as h,l as y,s as d,v as m,x as p,y as v,z as b,_ as w,o as g,c as x,a as s,d as F,t as N,b as u,B as R}from"./entry.eQZ3auYG.js";import{u as T}from"./api.2o71dS_j.js";import{u as $}from"./toast.xQvLCn8q.js";import{i as U}from"./utils.kGqDb192.js";import"./index.w-DIluOk.js";import{u as k}from"./object.9wxptNlh.js";import"./nuxt-link.f01z1rl7.js";const B=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=$(),c=h(),a=y(null);try{a.value=([e,t]=d(()=>T().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=v(),{realmManagement:r}=b(i);if(!U(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.show({variant:"success",body:"The identity-provider was successfully updated."}),k(a,o)},handleFailed:o=>{n.show({variant:"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=R;return g(),x("div",null,[s("h1",P,[S,F(" "+N(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 W=w(B,[["render",E]]);export{W as default};
