import{_}from"./BPigo5_n.js";import{f,g as h,r as y,h as d,n as m,i as p,j as v,s as b,_ as w,o as g,c as F,a as s,d as N,t as R,b as u,k as T}from"./qGWCsquX.js";import{u as $}from"./CvqZkrWf.js";import{u as k}from"./DjfSO2bY.js";import{i as x}from"./D2p94zMK.js";import"./3akZTN-H.js";import{u as U}from"./koeG6dC5.js";import"./BNEsDCLV.js";const P=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=k(),c=h(),a=y(null);try{a.value=([e,t]=d(()=>$().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(!x(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."}),U(a,o)},handleFailed:o=>{n.show({variant:"warning",body:o.message})}}}},"$oziQrTrFR9"),S={class:"title no-border mb-3"},A=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=T;return g(),F("div",null,[s("h1",S,[A,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(P,[["render",E]]);export{q as default};
