import {FirebaseApp} from '@firebase/app-types'
import {initializeApp} from 'firebase-admin/app'

const firebaseConfig = {
  apiKey: 'AIzaSyAPh4qQUfyBNv8QnO77Rw5ep95lg_CHb7E',
  authDomain: 'mobiledevles6.firebaseapp.com',
  projectId: 'mobiledevles6',
  storageBucket: 'mobiledevles6.firebasestorage.app',
  messagingSenderId: '922020756960',
  appId: '1:922020756960:web:47fcb68192b65ed06eff85',
}

const globalForFirebase = globalThis as unknown as {firebase: FirebaseApp}

export const firebaseApp = globalForFirebase.firebase || initializeApp(firebaseConfig)

if (process.env.NODE_ENV !== 'production') globalForFirebase.firebase = firebaseApp
