import getConfig from 'next/config';
import { publicRuntimeConfigSchema } from '../config/schema/runtime-config';
import { COLORS_DEV, COLORS_PROD } from '../constants/colors';

const { publicRuntimeConfig } = getConfig();
const { USE_DEV_COLORS } = publicRuntimeConfigSchema.parse(publicRuntimeConfig);

export default function getColors() {
  if (USE_DEV_COLORS) {
    return COLORS_DEV;
  }

  return COLORS_PROD;
}
