Liferay.Loader.define("translation-web@2.0.69/js/translate/components/TranslateActionBar/LanguageSelector",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/drop-down","@frontend-taglib-clay$clayui/icon","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n("@frontend-taglib-clay$clayui/button")),r=i(n("@frontend-taglib-clay$clayui/drop-down")),l=i(n("@frontend-taglib-clay$clayui/icon")),o=(i(n("liferay!frontend-js-react-web$prop-types")),function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var l=a?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(n,r,l):n[r]=e[r]}n.default=e,t&&t.set(e,n);return n}(n("liferay!frontend-js-react-web$react")));function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}function u(e){const t=e.replace("_","-");return{icon:t.toLowerCase(),text:t}}var f=function({languageIds:e,onChange:t,selectedLanguageId:n}){const[c,i]=(0,o.useState)(!1),f=u(n);return o.default.createElement(r.default,{active:c,menuElementAttrs:{containerProps:{className:"translation-languages-dropdown"}},onActiveChange:i,trigger:o.default.createElement(a.default,{displayType:"secondary",monospaced:!0,small:!0},o.default.createElement("span",{className:"inline-item"},o.default.createElement(l.default,{symbol:f.icon})),o.default.createElement("span",{className:"btn-section"},f.text))},o.default.createElement(r.default.ItemList,null,e.map((e=>{const{icon:a,text:c}=u(e);return o.default.createElement(r.default.Item,{active:e===n,key:e,onClick:()=>{t(e),i(!1)}},o.default.createElement("span",{className:"inline-item inline-item-before"},o.default.createElement(l.default,{symbol:a})),c)}))))};t.default=f}}));
//# sourceMappingURL=LanguageSelector.js.map