import { resolve1688AccountProfileDir } from "../../automation/playwright/profile-dir.js";

export function resolveChatProfileDir({
  env = process.env,
  cwd = process.cwd(),
  homeDir,
} = {}) {
  return resolve1688AccountProfileDir({
    env,
    cwd,
    homeDir,
    explicitProfileDir: env.CHAT_1688_PROFILE_DIR || env.SEARCH_1688_PROFILE_DIR || "",
    accountId: env.CHAT_1688_ACCOUNT_ID || env.SEARCH_1688_ACCOUNT_ID || "",
    accountName: env.SEARCH_1688_ACCOUNT_NAME || env.LOGIN_1688_USER || "",
  });
}
