import {
  WU_EVENTS_FILE_NAME
} from "./chunk-2GXVIN57.js";
import {
  LUMENFLOW_PATHS
} from "./chunk-DWMLTXKQ.js";
import {
  getConfig
} from "./chunk-V6OJGLBA.js";

// src/state-path-resolvers.ts
import path from "path";
function resolveStateDir(projectRoot) {
  try {
    return path.join(projectRoot, getConfig({ projectRoot }).state.stateDir);
  } catch {
    return path.join(projectRoot, LUMENFLOW_PATHS.STATE_DIR);
  }
}
function resolveWuEventsRelativePath(projectRoot) {
  try {
    const stateDir = getConfig({ projectRoot }).state.stateDir;
    return path.posix.join(stateDir.replace(/\\/g, "/"), WU_EVENTS_FILE_NAME);
  } catch {
    return LUMENFLOW_PATHS.WU_EVENTS;
  }
}

export {
  resolveStateDir,
  resolveWuEventsRelativePath
};
