import 'package:cs_resources/generated/assets.dart';
import 'package:cs_resources/generated/l10n.dart';
import 'package:domain/entity/home_list_entity.dart';

class HomeState {
  final List<Map<String, dynamic>> homeCategory;
  final List<Map<String, dynamic>> lastNews;
  HomeListEntity? homeIndex;

  HomeState({
    List<Map<String, dynamic>>? homeCategory,
    List<Map<String, dynamic>>? lastNews,
    this.homeIndex,
  })  : homeCategory = homeCategory ??
            [
              {
                'category_name': S.current.facility,
                'category_icon': Assets.mainHomeFacilityIcon,
              },
              {
                'category_name': S.current.form,
                'category_icon': Assets.mainHomeFormsIcon,
              },
              {
                'category_name': S.current.notice_board,
                'category_icon': Assets.mainHomeBoticeBoardIcon,
              },
              // {
              //   'category_name': S.current.property,
              //   'category_icon': Assets.mainHomePropertyIcon,
              // },
              // {
              //   'category_name': S.current.service,
              //   'category_icon': Assets.mainHomeServiceIcon,
              // },
              // {
              //   'category_name': S.current.community,
              //   'category_icon': Assets.mainHomeCommunityIcon,
              // }
            ],
        lastNews = lastNews ??
            [
              {
                'category_name': S.current.property,
                'category_icon': Assets.mainHomePropertyNews,
              },
              {
                'category_name': S.current.internal,
                'category_icon': Assets.mainHomeInternalNews,
              },
              {
                'category_name': S.current.info,
                'category_icon': Assets.mainHomeInfoNews,
              },
              {
                'category_name': S.current.notice,
                'category_icon': Assets.mainHomePublishNews,
              }
            ];

  HomeState copyWith({
    HomeListEntity? homeIndex,
  }) {
    return HomeState(
      homeIndex: homeIndex ?? this.homeIndex,
      homeCategory: homeCategory,
      lastNews: lastNews,
    );
  }
}
