import { registerAs } from "@nestjs/config";

export default registerAs("cac", () => ({
  baseUrl: process.env.CAC_BASE_URL || "",
  username: process.env.CAC_USERNAME || "",
  password: process.env.CAC_PASSWORD || "",
  appKey: process.env.CAC_APP_KEY || "",
  apiKey: process.env.CAC_API_KEY || "",
  companyServicesId: Number(process.env.CAC_COMPANY_SERVICES_ID || 0),
  currency: process.env.CAC_CURRENCY || "DJF",
  tokenTtlMs: Number(process.env.CAC_TOKEN_TTL_MS || 23 * 60 * 60 * 1000),
  otpExpiryMs: Number(process.env.CAC_OTP_EXPIRY_MS || 10 * 60 * 1000),
}));
