#!/usr/bin/env node
import {
  init_esm_shims
} from "./chunk-DHET7RCE.js";

// src/cli/components/hooks/use-modal-state.ts
init_esm_shims();
import { useState, useCallback } from "react";
function useModalState() {
  const [context, setContext] = useState(null);
  const isOpen = context !== null;
  const open = useCallback((ctx) => {
    setContext(ctx);
  }, []);
  const close = useCallback(() => {
    setContext(null);
  }, []);
  return { isOpen, context, open, close };
}

export {
  useModalState
};
//# sourceMappingURL=chunk-7SOPVGDV.js.map