import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/asyncToGenerator";import r from"@babel/runtime/regenerator";import{useCallback as o}from"react";import{Action as n}from"../../types.js";import{updateTemplate as a}from"../utils.js";import{useGet as c}from"./sharedHooks.js";import"../../../../utils/index.js";import{showSuccessNotification as i}from"../../../../utils/notificationToasts.js";function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function p(e){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?s(Object(o),!0).forEach((function(r){t(e,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var f=function(){var t=c("set"),s=c("get");return o(function(){var o=e(r.mark((function e(o,c){var f;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a(s,t,o,(function(t){return{metadata:p(p({},t.metadata),{},{folderPath:c})}}),n.UpdateMetadata);case 2:(f=e.sent)&&i(c?'"'.concat(f.name,'" was moved to "').concat(c,'" folder'):'"'.concat(f.name,'" was moved out of the folder'));case 4:case"end":return e.stop()}}),e)})));return function(t,e){return o.apply(this,arguments)}}(),[s,t])};export{f as useMoveToFolder};
//# sourceMappingURL=useMoveToFolder.js.map
