"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/objectWithoutProperties"),r=require("react/jsx-runtime"),n=require("react"),a=require("../effects/useGradientStorage.js"),i=require("../GradientManager.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=o(e),u=o(t),d=["storageConfig"];function c(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 g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){s.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}exports.GradientManagerWithStorage=function(e){var t=e.storageConfig,o=u.default(e,d),s=a.useGradientStorage(t),c=n.useCallback((function(e){s.setGradients(e),o.onGradientsChange&&o.onGradientsChange(e)}),[s.setGradients,o.onGradientsChange]),f=n.useCallback((function(e){s.setIsEditing(e),o.onGradientEditStateChange&&o.onGradientEditStateChange(e)}),[s.setIsEditing,o.onGradientEditStateChange]);return r.jsx(i.GradientManager,g(g({},o),{},{disableGradientsManagement:s.isLoading||o.disableGradientsManagement,gradients:s.gradients,onGradientsChange:c,onGradientEditStateChange:f}))};
//# sourceMappingURL=GradientManagerWithStorage.js.map
