Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.156/page_editor/plugins/browser/components/page_structure/components/item_configuration_panels/collection_general_panel/EmptyCollectionOptions",["module","exports","require","@frontend-taglib-clay$clayui/form","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../../../../../../../app/contexts/StoreContext","../../../../../../../app/selectors/selectLanguageId","../../../../../../../app/utils/getEditableLocalizedValue","../../../../../../../common/components/CurrentLanguageFlag","../../../../../../../common/hooks/useControlledState","../../../../../../../common/hooks/useId"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyCollectionOptions=function EmptyCollectionOptions({collectionEmptyCollectionMessageId:e,emptyCollectionOptions:t,handleConfigurationChanged:r}){const{displayMessage:s=!0}=t||{},d=(0,p.useId)(),f=(0,a.useSelector)(l.default),[m,y]=(0,u.default)((0,i.getEditableLocalizedValue)(null==t?void 0:t.message,f,Liferay.Language.get("no-results-found")));return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:"mb-2 pt-1"},o.default.createElement(n.ClayCheckbox,{"aria-describedby":d,checked:s,containerProps:{className:"mb-0"},label:Liferay.Language.get("show-empty-collection-alert"),onChange:e=>r({emptyCollectionOptions:_objectSpread(_objectSpread({},t),{},{displayMessage:e.target.checked})})}),o.default.createElement("div",{className:"mb-3 mt-1 small text-secondary",id:d},Liferay.Language.get("checking-this-option-will-display-an-informative-message-in-view-mode-when-no-results-match-the-applied-filters-or-the-collection-is-empty"))),s&&o.default.createElement(n.default.Group,{small:!0},o.default.createElement("label",{htmlFor:e},Liferay.Language.get("empty-collection-alert")),o.default.createElement(n.ClayInput.Group,{small:!0},o.default.createElement(n.ClayInput.GroupItem,null,o.default.createElement(n.ClayInput,{id:e,onBlur:()=>r({emptyCollectionOptions:_objectSpread(_objectSpread({},t),{},{message:_objectSpread(_objectSpread({},null==t?void 0:t.message),{},{[f]:m})})}),onChange:e=>y(e.target.value),type:"text",value:m||""})),o.default.createElement(n.ClayInput.GroupItem,{shrink:!0},o.default.createElement(c.default,null)))))};var n=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 r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=n?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}r.default=e,t&&t.set(e,r);return r}(r("@frontend-taglib-clay$clayui/form")),o=(_interopRequireDefault(r("liferay!frontend-js-react-web$prop-types")),_interopRequireDefault(r("liferay!frontend-js-react-web$react"))),a=r("../../../../../../../app/contexts/StoreContext"),l=_interopRequireDefault(r("../../../../../../../app/selectors/selectLanguageId")),i=r("../../../../../../../app/utils/getEditableLocalizedValue"),c=_interopRequireDefault(r("../../../../../../../common/components/CurrentLanguageFlag")),u=_interopRequireDefault(r("../../../../../../../common/hooks/useControlledState")),p=r("../../../../../../../common/hooks/useId");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}}}));
//# sourceMappingURL=EmptyCollectionOptions.js.map