Liferay.Loader.define("journal-web@5.0.81/js/ChangeDefaultLanguage.es",["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","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=f(a("@frontend-taglib-clay$clayui/button")),n=f(a("@frontend-taglib-clay$clayui/drop-down")),r=f(a("@frontend-taglib-clay$clayui/icon")),u=f(a("@frontend-taglib-clay$clayui/label")),i=f(a("@frontend-taglib-clay$clayui/layout")),o=(f(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=c();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 c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function f(e){return e&&e.__esModule?e:{default:e}}var d=function(e){const[t,a]=(0,o.useState)(!1),[c,f]=(0,o.useState)(e.defaultLanguage),d=(0,o.useCallback)(((e,t)=>{f(t),a(!1),Liferay.fire("inputLocalized:defaultLocaleChanged",{item:e.currentTarget})}),[]);return o.default.createElement("div",{className:"article-default-language"},o.default.createElement("p",{className:"mb-0"},o.default.createElement("b",null,"".concat(Liferay.Language.get("web-content-default-language"),": ")),e.strings[c]),o.default.createElement(n.default,{active:t,className:"mt-2",onActiveChange:a,trigger:o.default.createElement(l.default,{"aria-expanded":t,"aria-haspopup":"true",className:"dropdown-toggle",displayType:"secondary"},o.default.createElement("strong",null,Liferay.Language.get("change")),o.default.createElement(r.default,{className:"inline-item inline-item-after",symbol:"caret-bottom"}))},o.default.createElement(n.default.ItemList,null,e.languages.map((e=>o.default.createElement(n.default.Item,{className:"autofit-row","data-value":e.label,key:e.label,onClick:t=>d(t,e.label),title:e.label},o.default.createElement(i.default.ContentCol,{expand:!0},o.default.createElement(i.default.ContentSection,null,o.default.createElement("span",{className:"inline-item inline-item-before"},o.default.createElement(r.default,{symbol:e.icon})),e.label)),e.label===c&&o.default.createElement(i.default.ContentCol,null,o.default.createElement(u.default,{displayType:"info"},Liferay.Language.get("default")))))))))};t.default=d}}));
//# sourceMappingURL=ChangeDefaultLanguage.es.js.map