import r from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import{useCallback as e}from"react";import{Action as o}from"../../types.js";import{findTemplate as n,updateTemplate as a}from"../utils.js";import{useGet as s}from"./sharedHooks.js";import"../../../../utils/index.js";import{showSuccessNotification as i}from"../../../../utils/notificationToasts.js";var m=function(){var m=s("set"),c=s("get");return e(function(){var e=r(t.mark((function r(e,s){var p;return t.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return p=n(c,e),r.next=3,a(c,m,e,{name:s},o.UpdateName);case 3:r.sent&&p&&i('"'.concat(p.name,'" was renamed to "').concat(s,'"'));case 5:case"end":return r.stop()}}),r)})));return function(r,t){return e.apply(this,arguments)}}(),[c,m])};export{m as useUpdateTemplateName};
//# sourceMappingURL=useUpdateTemplateName.js.map
