import{__rest as t,__assign as e}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as n}from"react/jsx-runtime";import{useCallback as a}from"react";import{useGradientStorage as i}from"../effects/useGradientStorage.js";import{GradientManager as r}from"../GradientManager.js";var s=function(s){var o=s.storageConfig,d=t(s,["storageConfig"]),g=i(o),m=a((function(t){g.setGradients(t),d.onGradientsChange&&d.onGradientsChange(t)}),[g.setGradients,d.onGradientsChange]),G=a((function(t){g.setIsEditing(t),d.onGradientEditStateChange&&d.onGradientEditStateChange(t)}),[g.setIsEditing,d.onGradientEditStateChange]);return n(r,e({},d,{disableGradientsManagement:g.isLoading||d.disableGradientsManagement,gradients:g.gradients,onGradientsChange:m,onGradientEditStateChange:G}))};export{s as GradientManagerWithStorage};
