const fetch = require('node-fetch');

const getSupabaseUrl = async () => {
  const response = await fetch('https://admin.bro-js.ru/api/config/v1/dev');
  const data = await response.json();
  return data.features['sber_mobile'].SUPABASE_URL.value;
};

const getSupabaseKey = async () => {
  const response = await fetch('https://admin.bro-js.ru/api/config/v1/dev');
  const data = await response.json();
  return data.features['sber_mobile'].SUPABASE_KEY.value;
};

const getSupabaseServiceKey = async () => {
  const response = await fetch('https://admin.bro-js.ru/api/config/v1/dev');
  const data = await response.json();
  return data.features['sber_mobile'].SUPABASE_SERVICE_KEY.value;
};

module.exports = {
  getSupabaseUrl,
  getSupabaseKey,
  getSupabaseServiceKey
}; 