import{useRef as r,useEffect as t}from"react";import"zustand";import"lodash";import"../picker-props-store/PickerPropsStoreContext.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/objectWithoutProperties";import"react/jsx-runtime";import"../../viewport/ViewportProvider.js";import"../../viewport/ViewportContext.js";import{usePickerPropsStore as e}from"../picker-props-store/usePickerPropsStore.js";import{createIdasResyncController as o}from"./createIdasResyncController.js";import{useIdasResyncStoreApi as i}from"./useIdasResyncStoreApi.js";var s=function(s){var n=s.assetId,p=s.loadExternalOffsets,a=i(),u=e((function(r){return r.currentUser})),c=r(null);c.current||(c.current=o(a)),t((function(){var r=c.current;if(r)return r.activate(),function(){return r.deactivate()}}),[]),t((function(){var r;null===(r=c.current)||void 0===r||r.update({assetId:n,currentUser:u,loadExternalOffsets:p})}),[n,u,p])};export{s as useIdasResyncSync};
//# sourceMappingURL=useIdasResyncSync.js.map
