(self.webpackChunkrichie_education=self.webpackChunkrichie_education||[]).push([[74587],{74587:function(e,t,n){"use strict";n.r(t),n(19457),n(39275),n(22321),n(55862),n(23528),n(54994),n(73214),n(16543),n(33142),n(26364),n(86632),n(10853),n(80174),n(3973),n(80044),n(19701),n(80238),n(6208),n(12938),n(26425),n(61928),n(54883),n(45007),n(68995);var r=n(36108),c=n(34323),a=n(68919),o=n(67557);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(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=function(e){var t=function(e,t){if("object"!==l(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===l(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=(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,l=(0,c.YB)(),s=Object.values(n),u=(0,r.L7)({items:s,initialSelectedItem:n[t],onSelectedItemChange:function(e){var t=e.selectedItem;a.xh.replace("".concat(t.url).concat(a.xh.search))}}),f=u.isOpen,d=u.selectedItem,p=u.getToggleButtonProps,m=u.getLabelProps,b=u.getMenuProps,y=u.highlightedIndex,h=u.getItemProps;return(0,o.jsxs)("div",{className:"selector",children:[(0,o.jsx)("label",i(i({},m()),{},{className:"offscreen",children:(0,o.jsx)(c._H,i({},g.selectLanguage))})),(0,o.jsxs)("button",i(i({},p()),{},{className:"selector__button",children:[(null==d?void 0:d.name)||l.formatMessage(g.languages),(0,o.jsx)("svg",{role:"img",className:"selector__button__icon","aria-hidden":"true",children:(0,o.jsx)("use",{xlinkHref:"#icon-chevron-down"})})]})),(0,o.jsx)("ul",i(i({},b()),{},{className:"selector__list ".concat(f?"":"selector__list--is-closed"),children:f&&s.map((function(e,t){return(0,o.jsx)("li",i(i({},h({item:e,index:t})),{},{children:(0,o.jsx)("a",{className:"selector__list__link ".concat(y===t?"selector__list__link--highlighted":""),href:"".concat(e.url).concat(a.xh.search),title:"".concat(l.formatMessage(g.switchToLanguage,{language:e.name})).concat((null==d?void 0:d.code)===e.code?" "+l.formatMessage(g.currentlySelected):""),children:e.name})}),"".concat(e.code).concat(t))}))}))]})}},19457:function(e,t,n){var r=n(19882),c=n(8765).values;r({target:"Object",stat:!0},{values:function(e){return c(e)}})}}]);
//# sourceMappingURL=74587.02a18e97b46d65f95209.index.js.map