Liferay.Loader.define("layout-reports-web@1.0.56/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","../constants/actionTypes","../context/StoreContext","../utils/loadIssues"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function Translation({defaultLanguageId:e,pageURLs:t,selectedLanguageId:a}){const[y,p]=(0,c.useState)(!1),g=(0,c.useContext)(f.StoreDispatchContext),{loading:b}=(0,c.useContext)(f.StoreStateContext);return c.default.createElement(n.default,{active:y,hasLeftSymbols:!0,menuElementAttrs:{containerProps:{className:"cadmin"}},onActiveChange:p,trigger:c.default.createElement(l.default,{className:"btn-monospaced",disabled:b,displayType:"secondary",small:!0},c.default.createElement(r.default,{symbol:a.toLowerCase()}),c.default.createElement("span",{className:"d-block font-weight-normal",style:{fontSize:"9px"}},a))},c.default.createElement(n.default.ItemList,null,Object.values(t).map((({languageId:l,languageLabel:r},f)=>c.default.createElement(n.default.Item,{active:a===l,key:f,onClick:()=>(a=>{g({languageId:a,type:d.SET_LANGUAGE_ID}),p(!1);const l=t.find((t=>t.languageId===(a||e)));(0,s.default)({dispatch:g,languageId:a,refreshCache:!1,url:l})})(l),symbolLeft:l.toLowerCase()},c.default.createElement(i.default.ContentRow,null,c.default.createElement(i.default.ContentCol,{expand:!0},c.default.createElement(u.ClayTooltipProvider,null,c.default.createElement("span",{className:"text-truncate-inline","data-tooltip-align":"top",title:r},c.default.createElement("span",{className:"text-truncate"},r)))),e===l&&c.default.createElement(o.default,{className:"flex-shrink-0 ml-1",displayType:"primary"},Liferay.Language.get("default"))))))))};var l=_interopRequireDefault(a("@frontend-taglib-clay$clayui/button")),n=_interopRequireDefault(a("@frontend-taglib-clay$clayui/drop-down")),r=_interopRequireDefault(a("@frontend-taglib-clay$clayui/icon")),o=_interopRequireDefault(a("@frontend-taglib-clay$clayui/label")),i=_interopRequireDefault(a("@frontend-taglib-clay$clayui/layout")),u=a("@frontend-taglib-clay$clayui/tooltip"),c=(_interopRequireDefault(a("liferay!frontend-js-react-web$prop-types")),function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();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"))),d=a("../constants/actionTypes"),f=a("../context/StoreContext"),s=_interopRequireDefault(a("../utils/loadIssues"));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=Translation.js.map