Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.141/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","../../../../../../../core/hooks/useControlledState","../../../../../../../core/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,o.useSelector)(l.default),[y,g]=(0,u.default)((0,i.getEditableLocalizedValue)(null==t?void 0:t.message,f,Liferay.Language.get("no-results-found")));return n.default.createElement(n.default.Fragment,null,n.default.createElement("div",{className:"mb-2 pt-1"},n.default.createElement(a.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})})}),n.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&&n.default.createElement(a.default.Group,{small:!0},n.default.createElement("label",{htmlFor:e},Liferay.Language.get("empty-collection-alert")),n.default.createElement(a.ClayInput.Group,{small:!0},n.default.createElement(a.ClayInput.GroupItem,null,n.default.createElement(a.ClayInput,{id:e,onBlur:()=>r({emptyCollectionOptions:_objectSpread(_objectSpread({},t),{},{message:_objectSpread(_objectSpread({},null==t?void 0:t.message),{},{[f]:y})})}),onChange:e=>g(e.target.value),type:"text",value:y||""})),n.default.createElement(a.ClayInput.GroupItem,{shrink:!0},n.default.createElement(c.default,null)))))};var a=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={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var o=a?Object.getOwnPropertyDescriptor(e,n):null;o&&(o.get||o.set)?Object.defineProperty(r,n,o):r[n]=e[n]}r.default=e,t&&t.set(e,r);return r}(r("@frontend-taglib-clay$clayui/form")),n=(_interopRequireDefault(r("liferay!frontend-js-react-web$prop-types")),_interopRequireDefault(r("liferay!frontend-js-react-web$react"))),o=r("../../../../../../../app/contexts/StoreContext"),l=_interopRequireDefault(r("../../../../../../../app/selectors/selectLanguageId")),i=r("../../../../../../../app/utils/getEditableLocalizedValue"),c=_interopRequireDefault(r("../../../../../../../common/components/CurrentLanguageFlag")),u=_interopRequireDefault(r("../../../../../../../core/hooks/useControlledState")),p=r("../../../../../../../core/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 a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}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