import{aw as l,j as e,az as m,ax as o,o as n}from"./app-BgLa5dit.js";import{a as i,S as p,b as u}from"./B11DWb8Z.chunk.js";import{E as c}from"./DTaYxhew.chunk.js";import{C as g}from"./BWCfLV66.chunk.js";import{C as x}from"./q-IBKcuF.chunk.js";import"./CIRO_mWB.chunk.js";import"./DV8zX5C-.chunk.js";import"./CVqrJ8QP.chunk.js";import"./DJ0pq8J_.chunk.js";import"./CCcwLDvu.chunk.js";import"./DDfKZ_ng.chunk.js";import"./Bs6fQ2wT.chunk.js";import"./BUT90D7O.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 v="_container_i9gd3_1",d={container:v};function h(){const a=l(),r=i.requireOrganisationId(a.values.idpId);return e.jsx("div",{className:`mt-4 ${d.container}`,children:e.jsxs(m,{children:[e.jsx(o,{name:"mapTo",id:"mapTo",type:"text",label:`${i.getLabel(a.values.idpId)}`,placeholder:`Enter the ${i.getLabel(a.values.idpId)}`,value:a.values.mapTo,onBlur:t=>{a.setFieldValue("mapTo",t.target.value.trim())}}),r&&e.jsx(o,{name:"orgId",id:"orgId",type:"text",label:"Organisation ID",placeholder:"Enter the Organisation ID",value:a.values.orgId,onBlur:t=>{a.setFieldValue("orgId",t.target.value.trim())}})]})})}function I(a){const r=l();return e.jsx("div",{className:`mt-4 ${d.container}`,children:e.jsxs(m,{children:[e.jsxs(o,{name:"organisation",id:"organisation",as:"select",label:"Organisation",value:r.values.organisation,className:r.values.organisation?"":"text-secondary",children:[e.jsx("option",{className:"text-secondary",value:"",children:"Select an organisation"}),a.samlOrganisations.map(t=>e.jsx("option",{value:t.name,className:"text-dark",children:t.name},t.id))]}),e.jsx(o,{name:"loginUrl",id:"loginUrl",type:"text",label:"SSO login URL",placeholder:"Enter SSO login URL",value:r.values.loginUrl,onBlur:t=>{r.setFieldValue("loginUrl",t.target.value.trim())}}),e.jsx(o,{name:"mapTo",id:"mapTo",type:"text",label:"External customer Id",placeholder:"Enter the external customer ID",value:r.values.mapTo,onBlur:t=>{r.setFieldValue("mapTo",t.target.value.trim())}})]})})}function w(a){const{isLegacy:r}=i.getSsoManagementContext(a.queryParams.idpId),t=n(x.customer(a.id)),s=n(t.data&&p.getSamlOrganisations(t.data.country.code));return e.jsxs(g,{id:a.id,currentStepId:u.IDP_MAPPING,queryParams:a.queryParams,isLoading:!s.hasCompleted||!t.hasCompleted,children:[e.jsx("h2",{className:"h3 mb-4",children:"Add IDP mapping"}),e.jsx(c,{id:a.queryParams.idpId}),r?e.jsx(I,{samlOrganisations:s.data}):e.jsx(h,{})]})}export{w as CustomerSsoWizardMappingView};
//# sourceMappingURL=DOxnkZrh.chunk.js.map
