import{j as n,_ as m,h as i,M as d,$ as u,D as c}from"./vendor.e6eaca24.js";import{u as b,i as l}from"./index.c6944236.js";const g="_toolbarMenuIconItem_6cejb_1",I="_localeTabPane_6cejb_5";var s={toolbarMenuIconItem:g,localeTabPane:I};const f=a=>{const o=b("language");return n(m,{className:a.className,activeIndex:a.locales.indexOf(a.activeLocale),onTabChange:(e,{activeIndex:t})=>t!==a.locales.length&&a.onSetActiveLocale(a.locales[t]),menu:{pointing:!0},panes:[...a.locales.map((e,t)=>({menuItem:i(d.Item,{children:[n(u,{name:l[e].flag}),o(`.${e}`)]},e),pane:{key:e,className:s.localeTabPane,content:a.item(e,t===0,a.locales.length===1)}})),{menuItem:n(c,{item:!0,icon:"add",active:"",disabled:a.locales.length===Object.keys(l).length,className:`icon ${s.toolbarMenuIconItem}`,children:n(c.Menu,{children:Object.keys(l).filter(e=>!a.locales.includes(e)).map(e=>n(c.Item,{flag:l[e].flag,text:o(`.${e}`),onClick:()=>a.onAddLocale(e)},e))})},"add"),pane:{key:"add",content:null}}],renderActiveOnly:!1})};export{f as L};
