import { createRequire as _createRequire } from 'node:module';
const require = _createRequire(import.meta.url);
import {
  useBiLogger
} from "./chunk-HWT3LUJJ.js";
import {
  wixCliAction,
  wixCliAppFlowStepsAnswers
} from "./chunk-TOBTRYZF.js";
import {
  require_react
} from "./chunk-TODKQSCF.js";
import {
  __toESM,
  init_esm_shims
} from "./chunk-EXLZF52D.js";

// ../cli-astro-commands/src/bi/useWixCliAstroBi.ts
init_esm_shims();
var import_react = __toESM(require_react(), 1);

// ../cli-astro-commands/src/bi/events.ts
init_esm_shims();
var wixCliAstroBiEvents = (biLogger) => ({
  cliAction: ({
    questionKey,
    question,
    action,
    key,
    additionalInfo
  }) => {
    void biLogger.report(
      wixCliAction({
        questionKey,
        question,
        action,
        key,
        additionalInfo: JSON.stringify(additionalInfo)
      })
    );
  },
  cliStepBack: ({
    additionalInfo
  }) => {
    void biLogger.report(
      wixCliAction({
        action: "goToPreviousStep",
        key: "Esc",
        additionalInfo: JSON.stringify(additionalInfo)
      })
    );
  },
  cliFlowStepAnswered: ({
    question,
    questionKey,
    answer,
    additionalInfo
  }) => {
    void biLogger.report(
      wixCliAppFlowStepsAnswers({
        questionKey,
        question,
        answer,
        additionalInfo: JSON.stringify(additionalInfo)
      })
    );
  }
});

// ../cli-astro-commands/src/bi/useWixCliAstroBi.ts
function useWixCliAstroBi() {
  const biLogger = useBiLogger();
  return (0, import_react.useMemo)(() => wixCliAstroBiEvents(biLogger), [biLogger]);
}

// ../cli-astro-commands/src/bi/index.ts
init_esm_shims();

export {
  useWixCliAstroBi
};
//# sourceMappingURL=chunk-7LH6HYMZ.js.map