import{j as e,Y as d,Q as u,au as v,b4 as b}from"./app-BgLa5dit.js";import{D as p}from"./C4BcftDO.chunk.js";import{H as g}from"./wvigAl7i.chunk.js";import{V as h}from"./DLXdkhC4.chunk.js";import{a as N}from"./B11DWb8Z.chunk.js";function m(a){return e.jsxs("div",{className:"row mt-3",children:[e.jsx("label",{className:"col-4",children:a.label}),e.jsx("span",{className:"col position-relative",children:a.value||"-"})]})}function I(a){var n,i,l,o;return a.idpId?e.jsxs(e.Fragment,{children:[a.licence&&!a.isReview&&e.jsx(m,{label:"RM Unify Licence",value:e.jsx(g,{applink:null,value:a.licence||"-"})}),e.jsx(m,{label:"External customer ID",value:e.jsx(g,{applink:null,value:a.externalCustomerId||"-"})}),a.showYearGroupInContainer&&a.bindings&&e.jsx(p,{className:"mt-3",disableCollapse:!0,heading:"Year group mappings",children:(n=a.masterYearGroups)==null?void 0:n.map(r=>{const t=r.value.toString(),s=a.bindings[t];return e.jsxs("div",{className:"row mx-3 my-0 py-3 px-0",children:[e.jsx("span",{className:"col-3 fw-semibold",children:r.name}),s!=null&&s.length?e.jsx("div",{className:"col d-flex flex-wrap gap-2",children:s.map((x,j)=>e.jsx(h,{value:x},j))}):e.jsx("span",{className:"col",children:"-"})]},t)})}),!a.isReview&&e.jsxs("div",{className:"position-relative",children:[e.jsx(m,{label:"Domains",value:(i=a.domains)!=null&&i.length?(l=a.domains)==null?void 0:l.map(r=>e.jsx("div",{className:"d-flex justify-content-between mb-2",children:e.jsx("span",{children:r})},r)):"-"}),a.editDomainAppLink&&!a.isReview&&e.jsx(d,{className:"position-absolute top-0 end-0",appLink:{...a.editDomainAppLink,args:[a.customerId]},children:e.jsx(u,{className:"svg-container cursor-pointer",svg:v})})]}),!a.showYearGroupInContainer&&a.bindings&&e.jsx(m,{label:"Year mappings",value:e.jsxs("div",{className:"col-11",children:[e.jsx(d,{appLink:a.editYearGroupAppLink,children:e.jsx(u,{className:"svg-container cursor-pointer position-absolute end-0 me-2",svg:v})}),(o=a.masterYearGroups)==null?void 0:o.map(r=>{const t=r.value.toString(),s=a.bindings[t];return e.jsxs("div",{className:"row my-0 mb-2 px-0",children:[e.jsx("span",{className:"col-3",children:r.name}),s!=null&&s.length?e.jsx("div",{className:"col d-flex flex-wrap gap-2",children:s.map((x,j)=>e.jsx(h,{value:x},j))}):e.jsx("span",{className:"col",children:"-"})]},t)})]})})]}):e.jsx(e.Fragment,{})}function f(a){return e.jsx("div",{className:"mt-3",children:e.jsx(p,{heading:"Year mappings",disableCollapse:!0,children:e.jsx("div",{className:"overflow-hidden",children:a.yearGroupMappings.map((n,i)=>e.jsx("div",{children:e.jsxs("div",{className:`row p-3 ${i===a.yearGroupMappings.length-1?"":"border-bottom"}`,children:[e.jsx("span",{className:"col-4 fw-semibold",children:n.yearGroupName}),e.jsx("span",{className:"col",children:n.ssoMapping||"-"})]})},i))})})})}function c(a){return e.jsxs("div",{className:"row mt-3",children:[e.jsx("label",{className:"col-4",children:a.label}),e.jsx("span",{className:"col position-relative text-break",children:a.value||"-"})]})}function S(a){var n,i;return a.idpId?e.jsxs(e.Fragment,{children:[e.jsx(c,{label:"SSO organisation code",value:a.orgName}),e.jsx(c,{label:"SSO login URL",value:a.loginUrl?e.jsx(g,{applink:null,value:a.loginUrl}):""}),e.jsx(c,{label:N.getLabel(a.idpId),value:a.externalSchoolId}),!a.isReview&&e.jsxs("div",{className:"position-relative",children:[e.jsx(c,{label:"Domains",value:(n=a.domains)!=null&&n.length?(i=a.domains)==null?void 0:i.map(l=>e.jsx("div",{className:"d-flex justify-content-between mb-2",children:e.jsx("span",{children:l})},l)):"-"}),a.editDomainAppLink&&!a.isReview&&e.jsx(d,{className:"position-absolute top-0 end-0",appLink:{...a.editDomainAppLink,args:[a.customerId]},children:e.jsx(u,{className:"svg-container cursor-pointer",svg:b})})]}),a.yearGroupsMapping&&a.showYearGroupInContainer&&e.jsx(f,{yearGroupMappings:a.yearGroupsMapping}),a.yearGroupsMapping&&!a.showYearGroupInContainer&&e.jsx(c,{label:"Year mappings",value:e.jsxs("div",{className:"col-11",children:[e.jsx(d,{appLink:a.editYearGroupAppLink,children:e.jsx(u,{className:"svg-container cursor-pointer position-absolute end-0 me-2",svg:v})}),a.yearGroupsMapping.map((l,o)=>e.jsxs("div",{className:"mb-2",children:[e.jsx("label",{children:l.yearGroupName}),e.jsx("input",{className:"form-control",value:l.ssoMapping,readOnly:!0,disabled:!0})]},o))]})})]}):e.jsx(e.Fragment,{})}export{I as C,S as a};
//# sourceMappingURL=BHK9IHay.chunk.js.map
