(self.webpackChunkrichie_education=self.webpackChunkrichie_education||[]).push([[8996],{8996:function(e,t,n){"use strict";n.r(t),n(19457),n(39275),n(22321),n(54994),n(73214),n(55862),n(3973),n(80044),n(26364),n(19701),n(10853),n(80238),n(6208),n(12938),n(26425);var a=n(42861),c=n(34323),r=n(68919),l=n(67557);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=(0,c.vU)({currentlySelected:{id:"components.LanguageSelector.currentlySelected",defaultMessage:[{type:0,value:"(currently selected)"}]},languages:{id:"components.LanguageSelector.languages",defaultMessage:[{type:0,value:"Languages"}]},selectLanguage:{id:"components.LanguageSelector.selectLanguage",defaultMessage:[{type:0,value:"Select a language:"}]},switchToLanguage:{id:"components.LanguageSelector.switchToLanguage",defaultMessage:[{type:0,value:"Switch to "},{type:1,value:"language"}]}});t.default=function(e){var t=e.currentLanguage,n=e.languages,s=(0,c.YB)(),u=Object.values(n),g=(0,a.L7)({items:u,initialSelectedItem:n[t],onSelectedItemChange:function(e){var t=e.selectedItem;r.xh.replace(t.url)}}),d=g.isOpen,f=g.selectedItem,p=g.getToggleButtonProps,h=g.getLabelProps,m=g.getMenuProps,b=g.highlightedIndex,v=g.getItemProps;return(0,l.jsxs)("div",{className:"selector",children:[(0,l.jsx)("label",o(o({},h()),{},{className:"offscreen",children:(0,l.jsx)(c._H,o({},i.selectLanguage))})),(0,l.jsxs)("button",o(o({},p()),{},{className:"selector__button",children:[(null==f?void 0:f.name)||s.formatMessage(i.languages),(0,l.jsx)("svg",{role:"img",className:"selector__button__icon","aria-hidden":"true",children:(0,l.jsx)("use",{xlinkHref:"#icon-chevron-down"})})]})),(0,l.jsx)("ul",o(o({},m()),{},{className:"selector__list ".concat(d?"":"selector__list--is-closed"),children:d&&u.map((function(e,t){return(0,l.jsx)("li",o(o({},v({item:e,index:t})),{},{children:(0,l.jsx)("a",{className:"selector__list__link ".concat(b===t?"selector__list__link--highlighted":""),href:e.url,title:"".concat(s.formatMessage(i.switchToLanguage,{language:e.name})).concat((null==f?void 0:f.code)===e.code?" "+s.formatMessage(i.currentlySelected):""),children:e.name})}),"".concat(e.code).concat(t))}))}))]})}},19457:function(e,t,n){var a=n(19882),c=n(8765).values;a({target:"Object",stat:!0},{values:function(e){return c(e)}})}}]);
//# sourceMappingURL=8996.4f4eb49d3dc5af92a293.index.js.map