import { jsxs } from "react/jsx-runtime";
import { Text } from "ink";
import { getProviderKeyStatus } from "@dexto/agent-management";
function ApiKeyStep({ provider }) {
  const keyStatus = getProviderKeyStatus(provider);
  if (keyStatus.hasApiKey) {
    return /* @__PURE__ */ jsxs(Text, { color: "green", children: [
      "\u2713 ",
      keyStatus.envVar,
      " already set, press Enter to skip"
    ] });
  }
  return /* @__PURE__ */ jsxs(Text, { color: "yellowBright", children: [
    "No ",
    keyStatus.envVar,
    " configured"
  ] });
}
function getProviderEnvVar(provider) {
  const keyStatus = getProviderKeyStatus(provider);
  return keyStatus.envVar;
}
function hasApiKeyConfigured(provider) {
  const keyStatus = getProviderKeyStatus(provider);
  return keyStatus.hasApiKey;
}
var ApiKeyStep_default = ApiKeyStep;
export {
  ApiKeyStep,
  ApiKeyStep_default as default,
  getProviderEnvVar,
  hasApiKeyConfigured
};
