Liferay.Loader.define("fragment-web@4.0.73/js/FragmentCollectionResourcesManagementToolbarPropsTransformer",["module","exports","require","frontend-js-web","./openDeleteFragmentCollectionResourceModal"],(function(e,t,o){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function propsTransformer(e){let{portletNamespace:t}=e;return _objectSpread(_objectSpread({},function _objectWithoutProperties(e,t){if(null==e)return{};var o,r,n=function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var o,r,n={},l=Object.keys(e);for(r=0;r<l.length;r++)o=l[r],t.indexOf(o)>=0||(n[o]=e[o]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)o=l[r],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}(e,["portletNamespace"])),{},{onActionButtonClick(e,{item:o}){const r=null==o?void 0:o.data;"deleteSelectedFragmentCollectionResources"===(null==r?void 0:r.action)&&(0,n.default)({multiple:!0,onDelete:()=>{const e=document.getElementById("".concat(t,"fm"));e&&submitForm(e,null==r?void 0:r.deleteFragmentCollectionResourcesURL)}})},onCreateButtonClick(e,{item:o}){const n=null==o?void 0:o.data;"addFragmentCollectionResource"===(null==n?void 0:n.action)&&(0,r.openSelectionModal)({onSelect(e){if(e){const o=JSON.parse(e.value),r=document.getElementById("".concat(t,"fileEntryId"));r&&r.setAttribute("value",o.fileEntryId);const n=document.getElementById("".concat(t,"fragmentCollectionResourceFm"));n&&submitForm(n)}},selectEventName:"".concat(t,"uploadFragmentCollectionResource"),title:Liferay.Language.get("upload-fragment-set-resource"),url:n.itemSelectorURL})}})};var r=o("frontend-js-web"),n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(o("./openDeleteFragmentCollectionResourceModal"));function ownKeys(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(o),!0).forEach((function(t){_defineProperty(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ownKeys(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function _defineProperty(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}}}));
//# sourceMappingURL=FragmentCollectionResourcesManagementToolbarPropsTransformer.js.map