import{aP as h,l as x,o as d,j as s,ag as C,aQ as u,F as M}from"./app-BgLa5dit.js";import{S as I}from"./Doe88eh-.chunk.js";import{C as S}from"./CsJ10TwK.chunk.js";import{C as a}from"./q-IBKcuF.chunk.js";import"./w68yffRy.chunk.js";import"./DUpYPoLs.chunk.js";import"./EZim8aq-.chunk.js";import"./BD9MrUJP.chunk.js";import"./s6cGcwlA.chunk.js";import"./Zwjmkasg.chunk.js";import"./4qGb1BIY.chunk.js";import"./DnXDEnAR.chunk.js";import"./DpUpv6rY.chunk.js";import"./CG7zbly5.chunk.js";import"./m4aqaK_l.chunk.js";import"./MEkA24R1.chunk.js";import"./C53kfXmd.chunk.js";const f="customers.ssoManagement",o=M.encloseNamespace(f);function O({customerId:t}){var n;const m=h(),r=x(),p=d(a.customer(t)),i=d(a.getCustomerIdpMappings(t));function g(e,c){u(m,a.addCustomerIdpMappings(t,{idpId:e.idpId,externalCustomerId:e.externalId},()=>{c({reset:!0}),r.success(o("createSuccess"))},()=>{c(),r.error(o("createError"))}))}function l(e){u(m,a.removeCustomerIdpMappings(t,e,()=>r.success(o("removeSuccess")),()=>r.error(o("removeError"))))}return s.jsxs(s.Fragment,{children:[p.data&&s.jsx(S,{customer:p.data}),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(I,{type:C.Customer,idpMappings:(n=i.data)==null?void 0:n.map(e=>({idpId:e.idpId,externalId:e.externalCustomerId})),isLoading:i.isFetching,onClickAddIdpMapping:g,removeIdpMapping:l})]})}export{O as CustomerSsoManagementView};
//# sourceMappingURL=O5q5Wxwz.chunk.js.map
