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