"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),r=require("react"),t=require("zustand"),n=require("../../utils.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=o(e),u=function(e){var o=r.useContext(n.StoreContext);if(!o)throw new Error("Missing TemplatesControl.Provider");return t.useStore(o,e)},a=function(e){return u((function(r){return r[e]}))};exports.useConfirmation=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.confirmationTargetTemplateId,i=n.confirmationTargetFolder,u=a("set");return r.useCallback((function(){return u({confirmationType:e,confirmationCallback:t,confirmationTargetTemplateId:o,confirmationTargetFolder:i})}),[t,i,o,e,u])},exports.useGet=a,exports.useSet=function(e){var t=u((function(e){return e.set}));return r.useCallback((function(r){return t(i.default({},e,r))}),[e,t])};
//# sourceMappingURL=sharedHooks.js.map
