import { useBookingTicket } from "./bookingTicket";
import { useMemoizedFn } from "ahooks";
var useScanManager = function useScanManager() {
  var bookingTicket = useBookingTicket();
  var disableAllScanListeners = useMemoizedFn(function () {
    if (!bookingTicket) return;
    bookingTicket.disableAllScanListeners();
  });
  var enableAllScanListeners = useMemoizedFn(function () {
    if (!bookingTicket) return;
    bookingTicket.enableAllScanListeners();
  });
  var clearAllScanListenersTaskQueue = useMemoizedFn(function () {
    if (!bookingTicket) return;
    bookingTicket.clearAllScanListenersTaskQueue();
  });
  return {
    disableAllScanListeners: disableAllScanListeners,
    enableAllScanListeners: enableAllScanListeners,
    clearAllScanListenersTaskQueue: clearAllScanListenersTaskQueue
  };
};
export default useScanManager;