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