import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/objectWithoutProperties";import{jsx as r}from"react/jsx-runtime";import{useCallback as n}from"react";import{useGradientStorage as i}from"../effects/useGradientStorage.js";import{GradientManager as o}from"../GradientManager.js";var a=["storageConfig"];function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?s(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var d=function(e){var s=e.storageConfig,d=t(e,a),g=i(s),f=n((function(e){g.setGradients(e),d.onGradientsChange&&d.onGradientsChange(e)}),[g.setGradients,d.onGradientsChange]),p=n((function(e){g.setIsEditing(e),d.onGradientEditStateChange&&d.onGradientEditStateChange(e)}),[g.setIsEditing,d.onGradientEditStateChange]);return r(o,c(c({},d),{},{disableGradientsManagement:g.isLoading||d.disableGradientsManagement,gradients:g.gradients,onGradientsChange:f,onGradientEditStateChange:p}))};export{d as GradientManagerWithStorage};
//# sourceMappingURL=GradientManagerWithStorage.js.map
