import { createEnv } from "@t3-oss/env-nextjs";
import { z } from "zod";

export const env = createEnv({
	server: {
		BASE_URL: z.string(),
		ARUBA_PASS: z.string(),
		ARUBA_USER: z.string(),
		BACKENDSERVER_URL: z.string(),
		EXP_API_PASS: z.string(),
		EXP_API_USER: z.string(),
		FIC_ACCESS_TOKEN: z.string(),
		FIC_CLIENT_ID: z.string(),
		FIC_COMPANY_ID: z.string(),
		INTERNAL_BASE_URL: z.string(),
		JWT_SECRET: z.string(),
		KEYDB_URL: z.string(),
		NODE_ENV: z.enum(["development", "test", "production"]),
		PGHOST: z.string(),
		PGPORT: z.string(),
		POSTGRES_DB: z.string(),
		POSTGRES_PASSWORD: z.string(),
		POSTGRES_USER: z.string(),
		SKIP_REDIS: z.string(),
		STRIPE_SECRET_KEY: z.string(),
		STRIPE_WEBHOOK_SECRET: z.string(),
		TILES_URL: z.string(),
		SKEBBY_USER: z.string(),
		SKEBBY_PASS: z.string(),
		REVALIDATION_SECRET: z.string(),
		STORAGE_URL: z.string(),
		STORAGE_TOKEN: z.string(),
	},
	client: {
		NEXT_PUBLIC_BASE_URL: z.string(),
		NEXT_PUBLIC_STRIPE_PUBLIC_KEY: z.string(),
		//NEXT_PUBLIC_TEST: z.string(),
	},
	experimental__runtimeEnv: {
		NEXT_PUBLIC_BASE_URL: process.env.NEXT_PUBLIC_BASE_URL,
		NEXT_PUBLIC_STRIPE_PUBLIC_KEY: process.env.NEXT_PUBLIC_STRIPE_PUBLIC_KEY,
		//NEXT_PUBLIC_TEST: process.env.NEXT_PUBLIC_TEST,
	},
	skipValidation: process.env.SKIP_ENV_VALIDATION === "1" || false,
});
