
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b64de940-2e56-5dbe-90c8-8e0ac5cccdc0")}catch(e){}}();
import{a as i}from"/static/build/_shared/chunk-Z6WUE6VA.js";import{b as c}from"/static/build/_shared/chunk-6447CFZ6.js";import{b as M}from"/static/build/_shared/chunk-A6MRZCXD.js";import{g as y}from"/static/build/_shared/chunk-TH7KSEJ4.js";import{i as w}from"/static/build/_shared/chunk-DGMPSN22.js";import{a as r}from"/static/build/_shared/chunk-BZ4GNQDK.js";import{Ca as I,Da as S,Ea as C,Fa as L,P as v,ja as o,za as x}from"/static/build/_shared/chunk-UH2D3PQV.js";import{b as d}from"/static/build/_shared/chunk-5WSRPT2V.js";import{a as T,d as h}from"/static/build/_shared/chunk-3TBRGSTP.js";import{h as u}from"/static/build/_shared/chunk-DAB2JGQW.js";var l=u(T());var t=u(h()),J=e=>{var f;let[E,m]=l.default.useState(e.value),a=l.default.useRef(null),{t:k,i18n:A}=d("common");l.default.useEffect(()=>{m(e.value)},[e.value]);let b=!a||!a.current||(a&&a.current&&a.current.offsetWidth)>80;return(0,t.jsxs)(I,{autoSelect:!1,children:[(0,t.jsx)(L,{as:v,rightIcon:e.rightIcon?e.rightIcon:b?(0,t.jsx)(w,{fontSize:"14px"}):void 0,leftIcon:e.leftIcon!==void 0?e.leftIcon:(0,t.jsx)(M,{fontSize:"12px",style:{marginLeft:"5px"}}),backgroundColor:r.skyblue,borderWidth:"1px",borderColor:r.brand,size:"md",fontSize:"14px",alignItems:"center",justifyContent:"center",textAlign:"center",p:2,style:e.style,ref:a,children:(f=c.find(n=>n.value==E))==null?void 0:f.label}),(0,t.jsx)(C,{children:c.map(n=>{var g;return(0,t.jsx)(S,{onClick:()=>{var s;try{y("language_changed",{customParams:{lang:n.value}})}catch(P){}i.setLanguageCookie(n.value),(s=e==null?void 0:e.onChange)==null||s.call(e,n.value),m(n.value),setTimeout(()=>{window.location.href=i.changePathLanguage(window.location.pathname+window.location.search+window.location.hash,n.value)},200)},children:(0,t.jsxs)(x,{children:[(0,t.jsx)(o,{children:(g=n.value)==null?void 0:g.toLocaleUpperCase()}),(0,t.jsx)(o,{mx:"5px",children:"\u2022"}),(0,t.jsx)(o,{children:n.label})]})},n.value)})})]})};export{J as a};
//# sourceMappingURL=/static/build/_shared/chunk-HALRFYTT.js.map

//# debugId=b64de940-2e56-5dbe-90c8-8e0ac5cccdc0
