import AuthService from './authService';
import FirebaseService from './firebaseService';
import PropertyService from './propertyService';

// TODO: change to firebase secrets or to use firebase functions
const firebaseConfig = {
  apiKey: 'AIzaSyBqMGmOF0-DkYDpnsmZwpf5S8w5cL3fBb8',
  authDomain: 'rental-calculator-13a9e.firebaseapp.com',
  databaseURL: 'https://rental-calculator-13a9e-default-rtdb.firebaseio.com',
  projectId: 'rental-calculator-13a9e',
  storageBucket: 'rental-calculator-13a9e.appspot.com',
  messagingSenderId: '479612883365',
  appId: '1:479612883365:web:fde2d2632ce4c42ce5184c',
  measurementId: 'G-JW7J8ZQ9FJ',
};

// TopHap
const propertyConfig = {
  dataBaseURL: process.env.REACT_APP_PROPERTY_DATA_BASE_URL,
  widgetBaseURL: process.env.REACT_APP_PROPERTY_WIDGET_BASE_URL,
  apiKey: process.env.REACT_APP_PROPERTY_API_KEY,
};

const firebase = new FirebaseService(firebaseConfig);
const authService = new AuthService();
const propertyService = new PropertyService(propertyConfig);

export { authService, firebase, propertyService };
