Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.130/page_editor/plugins/browser/components/page-structure/components/item-configuration-panels/collection-general-panel/EmptyCollectionOptions",["module","exports","require","@frontend-taglib-clay$clayui/form","@frontend-taglib-clay$clayui/icon","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/components/PopoverTooltip","../../../../../../../core/hooks/useControlledState","../../../../../../../core/hooks/useId"],(function(e,t,o){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyCollectionOptions=function({collectionEmptyCollectionMessageId:e,emptyCollectionOptions:t,handleConfigurationChanged:o}){const{displayMessage:d=!0}=t||{},g=(0,f.useId)(),m=(0,l.useSelector)(c.default),[b,O]=(0,p.default)((0,i.getEditableLocalizedValue)(null==t?void 0:t.message,m,Liferay.Language.get("no-results-found")));return a.default.createElement(a.default.Fragment,null,a.default.createElement("div",{className:"align-items-center d-flex mb-2 pt-1"},a.default.createElement(n.ClayCheckbox,{"aria-describedby":g,checked:d,containerProps:{className:"mb-0"},label:Liferay.Language.get("show-empty-collection-alert"),onChange:e=>o({emptyCollectionOptions:y(y({},t),{},{displayMessage:e.target.checked})})}),a.default.createElement(s.PopoverTooltip,{alignPosition:"left",content:Liferay.Language.get("information-message-displayed-in-view-mode-when-the-collection-is-empty-or-no-results-match-the-applied-filters"),header:Liferay.Language.get("empty-collection-alert"),id:g,trigger:a.default.createElement(r.default,{"aria-label":Liferay.Language.get("show-more"),className:"ml-2",symbol:"question-circle-full"})})),d&&a.default.createElement(n.default.Group,{small:!0},a.default.createElement("label",{htmlFor:e},Liferay.Language.get("empty-collection-alert")),a.default.createElement(n.ClayInput.Group,{small:!0},a.default.createElement(n.ClayInput.GroupItem,null,a.default.createElement(n.ClayInput,{id:e,onBlur:()=>o({emptyCollectionOptions:y(y({},t),{},{message:y(y({},null==t?void 0:t.message),{},{[m]:b})})}),onChange:e=>O(e.target.value),type:"text",value:b||""})),a.default.createElement(n.ClayInput.GroupItem,{shrink:!0},a.default.createElement(u.default,null)))))};var n=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var a=n?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(o,r,a):o[r]=e[r]}o.default=e,t&&t.set(e,o);return o}(o("@frontend-taglib-clay$clayui/form")),r=d(o("@frontend-taglib-clay$clayui/icon")),a=(d(o("liferay!frontend-js-react-web$prop-types")),d(o("liferay!frontend-js-react-web$react"))),l=o("../../../../../../../app/contexts/StoreContext"),c=d(o("../../../../../../../app/selectors/selectLanguageId")),i=o("../../../../../../../app/utils/getEditableLocalizedValue"),u=d(o("../../../../../../../common/components/CurrentLanguageFlag")),s=o("../../../../../../../common/components/PopoverTooltip"),p=d(o("../../../../../../../core/hooks/useControlledState")),f=o("../../../../../../../core/hooks/useId");function d(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function m(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function y(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?m(Object(o),!0).forEach((function(t){b(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):m(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function b(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}}}));
//# sourceMappingURL=EmptyCollectionOptions.js.map