import 'package:krow/core/data/models/staff_role.dart';
import 'package:krow/features/profile/role_kit/domain/staff_role_kit_repository_impl.dart';
import 'package:krow/features/profile/role_kit/domain/role_kit_entity.dart';

class RoleKitState {
  final bool showError;
  final bool loading;
  final bool success;
  final RoleKitType roleKitType;
  final List<RoleKitEntity> roleKitItems;
  final List<StaffRole> roles;
  final StaffRole? selectedRole;
  final String? apiError;

  RoleKitState(
      {this.showError = false,
      this.roleKitItems = const [],
      this.roles = const [],
      this.loading = false,
      this.selectedRole,
      this.roleKitType = RoleKitType.uniform,
      this.success = false,
      this.apiError});

  copyWith(
      {bool? showError,
      List<RoleKitEntity>? roleKitItems,
      RoleKitType? roleKitType,
      bool? loading,
      bool? success,
      List<StaffRole>? roles,
      StaffRole? selectedRole,
      String? apiError}) {
    return RoleKitState(
      showError: showError ?? this.showError,
      roleKitItems: roleKitItems ?? this.roleKitItems,
      loading: loading ?? false,
      success: success ?? false,
      roleKitType: roleKitType ?? this.roleKitType,
      roles: roles ?? this.roles,
      selectedRole: selectedRole ?? this.selectedRole,
      apiError: apiError,
    );
  }
}

