import { FastifyCorsOptions } from "@fastify/cors";
import { ENV } from "./env.js";
export const CONSTANTS: Record<string, any> = {
  CORS_OPTIONS: {
    credentials: true,
    origin: ENV.ALLOWED_ORIGINS.split(",").filter((origin) => origin),
    allowedHeaders: [
      "Content-Type",
      "Authorization",
      "x-upload-id",
      "x-chunk-index",
      ...(ENV.MODE === "dev" ? ["ngrok-skip-browser-warning", ""] : []),
    ],
    methods: ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"],
  } satisfies FastifyCorsOptions,
  BRAND_NAME: "",
  BRAND_LOGO: "",
  BRAND_ACCENT_COLOR: "",
  PUBLIC_APP_URI: "",
  BRAND_ADDRESS: "",
  PRIVACY_URL: "",
  TERMS_URL: "",
  APP_STORE_URL: "",
  PLAY_STORE_URL: "",
};

export const Global_Keys = {
  account_verification: "account_verification",
  reset_password: "reset_password",
  login_verification: "login_verification",
} as const;
