
import 'package:auto_route/auto_route.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:krow/core/data/enums/staff_skill_enums.dart';
import 'package:krow/core/data/models/staff/staff.dart';

@immutable
class ProfileState {
  final List<RoleState> roles;
  final Staff? staff;
  final MenuRoutItem menu;
  final bool isAvailableNow;

  const ProfileState({
    required this.menu,
    this.staff,
    this.roles = const [],
    this.isAvailableNow = false,
  });

  ProfileState copyWith({
    MenuRoutItem? menu,
    List<RoleState>? roles,
    Staff? staff,
    bool? isAvailableNow,
    int? testField,
  }) {
    return ProfileState(
      menu: menu ?? this.menu,
      roles: roles ?? this.roles,
      staff: staff ?? this.staff,
      isAvailableNow: isAvailableNow ?? this.isAvailableNow,
    );
  }
}

//mock
class RoleState {
  final String name;
  final int experience;
  final StaffSkillLevel level;

  RoleState(
      {required this.name, required this.experience, required this.level});
}

class MenuRoutItem {
  final String? title;
  final SvgPicture? icon;
  final bool showBadge;
  final PageRouteInfo? route;
  final VoidCallback? onTap;
  MenuRoutItem? parent;

  List<MenuRoutItem> children;

  MenuRoutItem({
    this.title,
    this.parent,
    this.icon,
    this.onTap,
    this.showBadge = false,
    this.route,
  }) : children = [];
}
