import{j as e,bF as w,cY as L,Y as I,Q as U,au as D}from"./app-BgLa5dit.js";import{S as E}from"./DjR16E2i.chunk.js";import{a}from"./B11DWb8Z.chunk.js";function d(t){const{title:l,values:s,isLast:u,showMiddleDivider:i,titleActions:v}=t;return e.jsxs("div",{className:`px-3 py-2 ${u?"":"border-bottom mb-2"} ${t.containerClassName||""}`,children:[e.jsxs("div",{className:"d-flex justify-content-between",children:[e.jsx("h3",{className:"h6 mb-3",children:l}),e.jsx("div",{className:"d-flex gap-1",children:v})]}),Array.isArray(s)?s.map((n,c)=>e.jsxs("div",{className:`d-flex ${i&&c!==s.length-1?"border-bottom border-gray-300 mb-3":""}`,children:[e.jsx("div",{className:"col col-3",children:e.jsx("label",{children:n.label})}),e.jsx("div",{className:"col col-9",children:n.value})]},c)):s]})}function m(t){return e.jsxs("div",{className:"d-flex justify-content-between",children:[e.jsx("span",{children:t.value}),e.jsx(L,{copyableContent:t.value,visible:!0})]})}function H(t){const[l,s]=w();return e.jsxs("div",{className:"d-flex justify-content-between",ref:l,children:[e.jsx("div",{className:"d-flex flex-wrap gap-2",children:t.values.map((u,i)=>e.jsx("span",{className:"rounded-pill bg-gray-300",children:u},i))}),e.jsx(L,{visible:s,copyableContent:t.values.toString()})]})}function x(t){return e.jsx(I,{appLink:t.appLink,children:e.jsx(U,{svg:D})})}function R(t){return t.certificates.length===0?e.jsx(e.Fragment,{}):e.jsx("div",{children:t.certificates.map((l,s)=>e.jsxs("div",{className:"d-flex justify-content-between",children:[e.jsx("span",{className:"text-break",children:l.fingerPrint??"-"}),e.jsx(E,{expiryDate:l.validBefore})]},s))})}function F(t){const{idp:l,certificates:s,attributeMappings:u,editIdpAppLink:i,showAttributeMappingsEdit:v=!0,domains:n,editDomainsAppLink:c}=t,{entityId:N,acsUrl:C,launchUrl:S}=a.getAuthUrls(l),r=a.generateAttributesHashObject(u);function k(){var b,j,p,g,f,h,A,y;const o=[];return t.showCustomerAttribute&&o.push({label:a.getAttributeLabel("customer"),value:((b=r.customerAttribute)==null?void 0:b.source)||"-"}),o.push({label:a.getAttributeLabel("first_name"),value:((j=r.firstNameAttribute)==null?void 0:j.source)||"-"},{label:a.getAttributeLabel("surname"),value:((p=r.surnameAttribute)==null?void 0:p.source)||"-"},{label:a.getAttributeLabel("display_name"),value:((g=r.displayNameAttribute)==null?void 0:g.source)||"-"},{label:a.getAttributeLabel("email"),value:((f=r.emailAddressAttribute)==null?void 0:f.source)||"-"},{label:a.getAttributeLabel("user_role"),value:((h=r.userRoleAttribute)==null?void 0:h.source)||"-"},{label:a.getAttributeLabel("user_type"),value:((A=r.userTypeAttribute)==null?void 0:A.source)||"-"},{label:a.getAttributeLabel("year_group_value"),value:((y=r.yearGroupValueAttribute)==null?void 0:y.source)||"-"}),o}return e.jsxs(e.Fragment,{children:[e.jsx(d,{title:"Service provider details",values:[{label:"Entity ID",value:e.jsx(m,{value:N})},{label:"ACS/Reply URL",value:e.jsx(m,{value:C})},{label:"Launch URL",value:e.jsx(m,{value:S})}]}),e.jsx(d,{title:"IDP details",titleActions:i?e.jsx(x,{appLink:i}):null,values:[{label:"Entity ID",value:(l==null?void 0:l.entityId)||"-"},{label:"Login URL",value:(l==null?void 0:l.loginUrl)||"-"},{label:"Log out URL",value:(l==null?void 0:l.logoutUrl)||"-"},{label:"Certificate fingerprint",value:s.length>0?e.jsx(R,{certificates:s}):"-"}]}),e.jsx(d,{title:"Attribute mappings",titleActions:v&&i?e.jsx(x,{appLink:i}):null,values:k()}),e.jsx(d,{titleActions:c?e.jsx(x,{appLink:c}):null,title:"Domains",isLast:t.isLast,values:[{label:"Domains",value:n&&n.length>0?e.jsx("div",{children:n.map((o,b)=>e.jsx("div",{className:"d-flex justify-content-between mb-2",children:e.jsx("div",{children:o})},b))}):"-"}]})]})}export{H as B,x as E,F as S,d as a};
//# sourceMappingURL=ClcCVqTk.chunk.js.map
