Liferay.Loader.define("analytics-reports-web@2.0.38/js/components/Translation",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/drop-down","@frontend-taglib-clay$clayui/icon","@frontend-taglib-clay$clayui/label","@frontend-taglib-clay$clayui/layout","@frontend-taglib-clay$clayui/tooltip","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../context/ChartStateContext","../context/StoreContext"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({onSelectedLanguageClick:e,viewURLs:t}){const{languageTag:a}=(0,i.useContext)(d.StoreStateContext),[s,y]=(0,i.useState)(!1),p=(0,i.useMemo)((()=>{var e;return(null===(e=t.find((e=>e.selected)))||void 0===e?void 0:e.languageId)||a}),[a,t]),{timeSpanKey:g,timeSpanOffset:m}=(0,i.useContext)(f.ChartStateContext);return i.default.createElement(u.default.ContentRow,null,i.default.createElement(u.default.ContentCol,null,i.default.createElement(l.default,{active:s,hasLeftSymbols:!0,menuElementAttrs:{className:"dropdown-menu__translation"},onActiveChange:y,trigger:i.default.createElement(n.default,{className:"btn-monospaced",displayType:"secondary",small:!0},i.default.createElement(o.default,{symbol:p.toLowerCase()}),i.default.createElement("span",{className:"d-block font-weight-normal",style:{fontSize:"9px"}},p))},i.default.createElement(l.default.ItemList,null,Object.values(t).map(((t,a)=>i.default.createElement(l.default.Item,{active:t.selected&&t.languageId,key:a,onClick:()=>{e(t.viewURL,g,m)},symbolLeft:t.languageId.toLowerCase()},i.default.createElement(u.default.ContentRow,null,i.default.createElement(u.default.ContentCol,{expand:!0},i.default.createElement(c.ClayTooltipProvider,null,i.default.createElement("span",{className:"text-truncate-inline","data-tooltip-align":"top",title:t.languageLabel},i.default.createElement("span",{className:"text-truncate"},t.languageLabel)))),t.default&&i.default.createElement(r.default,{displayType:"primary"},Liferay.Language.get("default"))))))))))};var n=y(a("@frontend-taglib-clay$clayui/button")),l=y(a("@frontend-taglib-clay$clayui/drop-down")),o=y(a("@frontend-taglib-clay$clayui/icon")),r=y(a("@frontend-taglib-clay$clayui/label")),u=y(a("@frontend-taglib-clay$clayui/layout")),c=a("@frontend-taglib-clay$clayui/tooltip"),i=(y(a("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=s();if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if(Object.prototype.hasOwnProperty.call(e,l)){var o=n?Object.getOwnPropertyDescriptor(e,l):null;o&&(o.get||o.set)?Object.defineProperty(a,l,o):a[l]=e[l]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react"))),f=a("../context/ChartStateContext"),d=a("../context/StoreContext");function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function y(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=Translation.js.map