import t,{useContext as o}from"react";import{__extends as e,__assign as n}from"../../../../../node_modules/tslib/tslib.es6.js";import{isSharedLayout as r,SharedLayoutContext as u,FramerTreeLayoutContext as a}from"../../../context/SharedLayoutContext.js";var s=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return e(o,t),o.prototype.componentDidMount=function(){var t=this.props,o=t.syncLayout,e=t.framerSyncLayout,n=t.visualElement;r(o)&&o.register(n),r(e)&&e.register(n)},o.prototype.getSnapshotBeforeUpdate=function(){var t=this.props,o=t.syncLayout,e=t.visualElement;return r(o)?o.syncUpdate():(e.snapshotViewportBox(),o.add(e)),null},o.prototype.componentDidUpdate=function(){var t=this.props,o=t.syncLayout,e=t.visualElement;r(o)||o.flush(),e.rebaseProjectionTarget()},o.prototype.render=function(){return null},o}(t.Component);function p(e){var r=o(u),p=o(a);return t.createElement(s,n({},e,{syncLayout:r,framerSyncLayout:p}))}var i={key:"measure-layout",shouldRender:function(t){return!!t.drag||!!t.layout||void 0!==t.layoutId},getComponent:function(){return p}};export{i as MeasureLayout};
//# sourceMappingURL=Measure.js.map
