import 'package:shared_preferences/shared_preferences.dart';

import '../../../Helper/Constants/Apiconstants.dart';
import '../../../Model/Response/Staffs/Getstaffsresponse.dart';
import '../../Provider/Staffs/Staffsprovider.dart';

class GetStaffsRepository{

  int? tenantId;

  GetStaffsProvider getStaffsProvider = GetStaffsProvider();

  Future<GetStaffsResponse?> getStaffs() async {
    SharedPreferences prefs = await SharedPreferences.getInstance();
    tenantId = prefs.getInt('tenantId')!;
    var result = await getStaffsProvider.getStaffs('${ApiConstants.getStaffs}/?tenantid=$tenantId',);
    return result;
  }

}