import 'package:rasadyar_core/core.dart';
import 'package:rasadyar_core/utils/utils.dart';

part 'widely_used_local_model.g.dart';

@HiveType(typeId: chickenWidelyUsedLocalModelTypeId)
class WidelyUsedLocalModel extends HiveObject {
  @HiveField(0)
  bool? hasInit;

  @HiveField(1)
  List<WidelyUsedLocalItem>? items;

  WidelyUsedLocalModel({this.hasInit, this.items});

  WidelyUsedLocalModel copyWith({bool? hasInit, List<WidelyUsedLocalItem>? items}) {
    return WidelyUsedLocalModel(hasInit: hasInit ?? this.hasInit, items: items ?? this.items);
  }
}

@HiveType(typeId: chickenWidelyUsedLocalItemTypeId)
class WidelyUsedLocalItem extends HiveObject {
  @HiveField(0)
  String? title;

  @HiveField(1)
  String? iconPath;

  @HiveField(2)
  int? iconColor;

  @HiveField(3)
  int? color;

  @HiveField(4)
  String? path;

  @HiveField(5)
  int? pathId;

  @HiveField(6)
  int? index;

  WidelyUsedLocalItem({
    this.title,
    this.iconPath,
    this.iconColor,
    this.color,
    this.path,
    this.pathId,
    this.index,
  });

  WidelyUsedLocalItem copyWith({
    String? title,
    String? iconPath,
    int? iconColor,
    int? color,
    int? pathId,
    int? index,
    String? path,
  }) {
    return WidelyUsedLocalItem(
      title: title ?? this.title,
      iconPath: iconPath ?? this.iconPath,
      iconColor: iconColor ?? this.iconColor,
      color: color ?? this.color,
      path: path ?? this.path,
      pathId: pathId ?? this.pathId,
      index: index ?? this.index,
    );
  }
}
