import 'package:dio/dio.dart';
import 'package:flutter/foundation.dart';
import 'package:mnemo_cards/flags.dart';

import '../../main.dart';
import 'firebase_config_repository.dart';

mixin Api {
  String get path =>
      !ADMIN_BUILD || (globalSharedPreferences.getBool('env') ?? true)
          //prod
          ? 'https://89.19.210.178:8080' //FirebaseRepository.appConfig.path
          : androidDeviceInfo!.isPhysicalDevice
              //device to localhost
              ? 'https://192.168.31.158:8080'
              : //emulator to localhost
              'https://10.0.2.2:8080';
}
