import{Z as u,j as n,Q as c,ee as d,ey as p,bU as g,ez as i}from"./app-BgLa5dit.js";var a=(e=>(e.UpToDate="up_to_date",e.Invalid="invalid",e.CanUpdate="can_update",e))(a||{});function C(e){const{componentStatus:t,className:o}=e,r={size:u.Small,className:o};switch(t){case a.UpToDate:return n.jsx("span",{className:"cursor-pointer text-success",children:n.jsx(c,{...r,title:"Already up to date",svg:g,tooltipSpanHack:!0})});case a.Invalid:return n.jsx("span",{className:"cursor-pointer text-danger",children:n.jsx(c,{...r,title:"Cannot be updated",svg:p,tooltipSpanHack:!0})});case a.CanUpdate:return n.jsx("span",{className:"cursor-pointer text-primary",children:n.jsx(c,{...r,title:"An update is available",svg:d,tooltipSpanHack:!0})})}}function m(e){switch(e){case"YearGroups":return"Year Groups";case"ContentRegion":return"Content Region";default:return e}}function x(e,t){return e?t?a.CanUpdate:a.Invalid:a.UpToDate}function f(e){var o,r;const t=(r=(o=e.drift)==null?void 0:o.components)==null?void 0:r.filter(s=>s.type!=="InstanceRegion");return n.jsx(n.Fragment,{children:e.drift&&n.jsx("div",{className:"border rounded p-3",children:n.jsx("ul",{className:"list-unstyled mb-0",children:t.map((s,l)=>n.jsxs("li",{className:`d-flex ${t.length-1!==l?"mb-2":""}`,children:[n.jsx(C,{className:"d-inline-block svg-container me-1",componentStatus:x(s.hasDrift,s.canMigrate)}),m(s.type)]},s.type))})})})}const v={[i.AU]:{region:"APAC",country:"Australia"},[i.NZ]:{region:"APAC",country:"New Zealand"},[i.US]:{region:"NA",country:"United States"},[i.UK]:{region:"EU",country:""},[i.CA]:{region:"NA",country:"Canada"}};function N(e,t){if(t)return(e==null?void 0:e.region)==="INT"?{region:"INT",country:"Global"}:v[t.country.code.toLocaleLowerCase()]}export{f as C,N as g};
//# sourceMappingURL=DXOqncq7.chunk.js.map
