Liferay.Loader.define("style-book-web@2.0.76/js/StyleBookManagementToolbarPropsTransformer",["module","exports","require","frontend-js-web","./openDeleteStyleBookModal"],(function(e,t,o){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function propsTransformer(e){let{additionalProps:{copyStyleBookEntryURL:t,exportStyleBookEntriesURL:o},portletNamespace:l}=e,c=function _objectWithoutProperties(e,t){if(null==e)return{};var o,n,r=function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var o,n,r={},l=Object.keys(e);for(n=0;n<l.length;n++)o=l[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)o=l[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,["additionalProps","portletNamespace"]);return _objectSpread(_objectSpread({},c),{},{onActionButtonClick:(e,{item:c})=>{var a;const i=null==c||null===(a=c.data)||void 0===a?void 0:a.action;"copySelectedStyleBookEntries"===i?(()=>{const e=document.getElementById("".concat(l,"fm")),o=document.getElementById("".concat(l,"styleBookEntryIds"));if(!e||!o)return;o.setAttribute("value",(0,n.getCheckedCheckboxes)(e,"".concat(l,"allRowIds")));const r=document.getElementById("".concat(l,"styleBookEntryFm"));r&&submitForm(r,t)})():"deleteSelectedStyleBookEntries"===i?(0,r.default)({multiple:!0,onDelete:()=>{const e=document.getElementById("".concat(l,"fm"));e&&submitForm(e)}}):"exportSelectedStyleBookEntries"===i&&(()=>{const e=document.getElementById("".concat(l,"fm"));e&&submitForm(e,o)})()},onCreateButtonClick(e,{item:t}){const o=null==t?void 0:t.data;(0,n.openSimpleInputModal)({dialogTitle:null==o?void 0:o.title,formSubmitURL:null==o?void 0:o.addStyleBookEntryURL,mainFieldLabel:Liferay.Language.get("name"),mainFieldName:"name",namespace:"".concat(l),placeholder:Liferay.Language.get("name")})}})};var n=o("frontend-js-web"),r=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(o("./openDeleteStyleBookModal"));function ownKeys(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 _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=StyleBookManagementToolbarPropsTransformer.js.map