import { onActivated, onDeactivated } from 'vue';
export default function useReactivated(callback) {
  var isDeactivatedRef = {
    isDeactivated: false
  };
  var activateStateInitialized = false;
  onActivated(function () {
    isDeactivatedRef.isDeactivated = false;
    if (!activateStateInitialized) {
      activateStateInitialized = true;
      return;
    }
    callback();
  });
  onDeactivated(function () {
    isDeactivatedRef.isDeactivated = true;
    if (!activateStateInitialized) {
      activateStateInitialized = true;
    }
  });
  return isDeactivatedRef;
}