import{l as u,k as x,o as m,j as s,ag as M,F as I}from"./app-BgLa5dit.js";import{S}from"./Doe88eh-.chunk.js";import{O as t}from"./u6fIQ8Ti.chunk.js";import"./w68yffRy.chunk.js";const j="organisations.ssoManagement",r=I.encloseNamespace(j);function F({organisationId:a}){var p;const n=u(),c=x(),i=m(t.organisation(a)),o=m(t.getIdpMappings(a));function g(e,d){const l={idpId:e.idpId,externalOrganisationId:e.externalId};c(t.addIdpMappings(a,l)).then(()=>{d({reset:!0}),n.success(r("createSuccess"))}).catch(()=>{d(),n.error(r("createError"))})}function h(e){c(t.removeIdpMappings(a,e)).then(()=>{n.success(r("removeSuccess"))}).catch(()=>{n.error(r("removeError"))})}return s.jsxs(s.Fragment,{children:[i.data&&s.jsx("h1",{className:"h6 mb-3",children:i.data.name}),s.jsx("h1",{className:"h2 mb-3",children:"SSO Management"}),s.jsx("hr",{className:"my-3"}),s.jsx("h2",{className:"h4 mt-4",children:"IDP Settings"}),s.jsx(S,{type:M.Organisation,idpMappings:(p=o.data)==null?void 0:p.map(e=>({idpId:e.idpId,externalId:e.externalOrganisationId})),isLoading:o.isFetching,onClickAddIdpMapping:g,removeIdpMapping:h})]})}export{F as OrganisationSsoManagementView};
//# sourceMappingURL=BAjZNQYT.chunk.js.map
