Liferay.Loader.define("@liferay/frontend-taglib@8.0.2/translation_manager/components/LocalesList",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/icon","@frontend-taglib-clay$clayui/tabs","liferay!frontend-js-react-web$react"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({availableLocales:t,changeableDefaultLanguage:a,defaultLocale:r,editingLocale:i,onLocaleClicked:c,onLocaleRemoved:u}){const f=(0,o.useMemo)((()=>{const e=Array.from(t.values());return[e.find((e=>e.id===r)),...e.filter((e=>e.id!==r))]}),[t,r]);return o.default.createElement(o.default.Fragment,null,f.map((t=>o.default.createElement(e,{editingLocale:i,key:t.id,locale:t,onLocaleClicked:()=>c&&c(t)},a&&r===t.id||t.id!==r&&o.default.createElement(l.default,{displayType:"unstyled",onClick:()=>u&&u(t),small:!0},o.default.createElement(n.default,{symbol:"times-small"}))))))};var l=c(a("@frontend-taglib-clay$clayui/button")),n=c(a("@frontend-taglib-clay$clayui/icon")),r=c(a("@frontend-taglib-clay$clayui/tabs")),o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var a={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=l?Object.getOwnPropertyDescriptor(e,n):null;r&&(r.get||r.set)?Object.defineProperty(a,n,r):a[n]=e[n]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react"));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function c(e){return e&&e.__esModule?e:{default:e}}const e=({children:e,editingLocale:t,locale:a,onLocaleClicked:l})=>o.default.createElement(r.default.Item,{active:t===a.id,onClick:()=>l&&l(a)},o.default.createElement(n.default,{className:"inline-item-before",symbol:a.icon}),o.default.createElement("span",{className:"inline-item-before"},a.label),e)}}));
//# sourceMappingURL=LocalesList.js.map