(self.webpackChunkrichie_education=self.webpackChunkrichie_education||[]).push([[8996],{8996:function(e,t,a){"use strict";a.r(t),a(19457),a(39275),a(22321),a(54994),a(73214),a(55862),a(33130);var n=a(10899),l=a(89526),c=a(34323),s=a(68919);function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}var o=(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,a=e.languages,u=(0,c.YB)(),g=Object.values(a),i=(0,n.L7)({items:g,initialSelectedItem:a[t],onSelectedItemChange:function(e){var t=e.selectedItem;s.xh.replace(t.url)}}),m=i.isOpen,d=i.selectedItem,f=i.getToggleButtonProps,p=i.getLabelProps,h=i.getMenuProps,v=i.highlightedIndex,_=i.getItemProps;return l.createElement("div",{className:"selector"},l.createElement("label",r({},p(),{className:"offscreen"}),l.createElement(c._H,o.selectLanguage)),l.createElement("button",r({},f(),{className:"selector__button"}),(null==d?void 0:d.name)||u.formatMessage(o.languages),l.createElement("svg",{role:"img",className:"selector__button__icon","aria-hidden":"true"},l.createElement("use",{xlinkHref:"#icon-chevron-down"}))),l.createElement("ul",r({},h(),{className:"selector__list ".concat(m?"":"selector__list--is-closed")}),m&&g.map((function(e,t){return l.createElement("li",r({key:"".concat(e.code).concat(t)},_({item:e,index:t})),l.createElement("a",{className:"selector__list__link ".concat(v===t?"selector__list__link--highlighted":""),href:e.url,title:"".concat(u.formatMessage(o.switchToLanguage,{language:e.name})).concat((null==d?void 0:d.code)===e.code?" "+u.formatMessage(o.currentlySelected):"")},e.name))}))))}},19457:function(e,t,a){var n=a(19882),l=a(8765).values;n({target:"Object",stat:!0},{values:function(e){return l(e)}})}}]);
//# sourceMappingURL=8996.0de783458d0ed5127629.index.js.map