import 'package:injectable/injectable.dart';
import 'package:krow/core/data/models/skill.dart';
import 'package:krow/core/data/models/staff_role.dart';
import 'package:krow/features/profile/role/data/staff_role_api.dart';
import 'package:krow/features/profile/role/domain/staff_role_repository.dart';

@Injectable(as: StaffRoleRepository)
class StaffRoleRepositoryImpl extends StaffRoleRepository {
  final StaffRoleApiProvider _staffRoleApi;

  StaffRoleRepositoryImpl(this._staffRoleApi);

  @override
  Future<List<StaffRole>> getStaffRole() async {
    return _staffRoleApi.fetchStaffRoles();
  }

  @override
  Future<List<Skill>> getSkills() {
    return _staffRoleApi.fetchSkills();
  }

  @override
  Future<String> saveStaffRole(StaffRole role) {
    return _staffRoleApi.saveStaffRole(role);
  }

  @override
  Future<void> deleteStaffRole(StaffRole role) {
    return _staffRoleApi.deleteStaffRole(role);
  }
}
