export const SHOW_ERASTEEL_METRICS =
  process.env.NEXT_PUBLIC_SHOW_ERASTEEL_METRICS === "true";

const configuredBookingUrl = process.env.NEXT_PUBLIC_BOOKING_URL?.trim();
const configuredContactEmail = process.env.NEXT_PUBLIC_CONTACT_EMAIL?.trim();

export const isBookingConfigured = Boolean(
  configuredBookingUrl || configuredContactEmail,
);

export const bookingHref =
  configuredBookingUrl ||
  (configuredContactEmail
    ? `mailto:${configuredContactEmail}?subject=${encodeURIComponent(
        "Sydo 10-minute call",
      )}`
    : "#booking");

export const bookingIsExternal = /^https?:\/\//.test(bookingHref);
export const bookingTarget = bookingIsExternal ? "_blank" : undefined;
export const bookingRel = bookingIsExternal ? "noreferrer" : undefined;

export const capabilities = [
  {
    title: "RL environments",
    body: "Purpose-built worlds with the states, actions and rewards your research requires.",
    span: "wide",
  },
  {
    title: "Evaluations",
    body: "Behavior measured against clear tasks, boundaries and failure modes.",
    span: "narrow",
  },
  {
    title: "AI agents",
    body: "Agents engineered around the environment, tools and operating constraints.",
    span: "third",
  },
  {
    title: "Simulation and forecasting",
    body: "Systems for exploring likely futures before acting in the real one.",
    span: "third",
  },
  {
    title: "Data infrastructure",
    body: "The pipelines and alignment work that make reliable models possible.",
    span: "third",
  },
] as const;

export const commissioningSteps = [
  {
    verb: "Define",
    detail: "The behavior or outcome that matters.",
  },
  {
    verb: "Specify",
    detail: "The world, data and measures.",
  },
  {
    verb: "Build",
    detail: "The environment, agent or system.",
  },
  {
    verb: "Validate",
    detail: "The behavior under real constraints.",
  },
  {
    verb: "Deliver",
    detail: "A working system integrated with your stack.",
  },
] as const;

export const erasteelStages = [
  {
    verb: "Ingest",
    detail: "SAP, historian and operator logs",
  },
  {
    verb: "Align",
    detail: "Deterministic time index",
  },
  {
    verb: "Model",
    detail: "X / P / Y partitions with GRU, LSTM and Transformer work",
  },
  {
    verb: "Decide",
    detail: "Forecasting, scenario simulation and sulphur risk",
  },
] as const;

export const methodology = [
  "Leakage-free validation",
  "Autoregressive scenario simulation",
  "Bayesian-network risk modelling",
] as const;

export const erasteelMetrics = [
  ["+40%", "Reporting reliability"],
  ["+18%", "Planning accuracy"],
  ["+12%", "Throughput"],
  ["99.7%", "Within historical safety bounds"],
  ["-22%", "False quality alerts"],
] as const;
