
import 'package:shared_preferences/shared_preferences.dart';

import '../../../Helper/Constants/Apiconstants.dart';
import '../../../Model/Response/Tenants/Tenantinforesponse.dart';
import '../../Provider/Tenants/Tenantsprovider.dart';

class TenantRepository{
  int? tenantId;
  int? locationId;

  TenantsProvider tenantsProvider = TenantsProvider();

  Future<TenantInfo?> getTenantInfo() async {
    SharedPreferences prefs = await SharedPreferences.getInstance();
    tenantId = prefs.getInt('tenantId') ?? 0;
    locationId = prefs.getInt('locationId')??0;
    print(tenantId);
    var result = await tenantsProvider.getTenantInfo('${ApiConstants.getTenantInfo}/?tenantid=$tenantId&locationid=$locationId');
    // var result = await tenantsProvider.getTenantInfo('${ApiConstants.tenantInfo}/?tenantid=$tenantId');
    return result;
  }




}