import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:hoshan/core/gen/assets.gen.dart';
import 'package:hoshan/ui/theme/cubit/theme_mode_cubit.dart';

class HomeNavbar {
  final String title;
  final String icon;
  bool enabled;
  final String outlineAsset = 'assets/icon/navbars/navigation/';
  String bulkAsset(String theme) => 'assets/icon/navbars/navigation-$theme/';
  HomeNavbar({required this.title, required this.icon, required this.enabled});

  SvgGenImage getIcon(BuildContext context) {
    final path =
        '${enabled ? bulkAsset(context.read<ThemeModeCubit>().isDark() ? 'dark' : 'light') : outlineAsset}$icon.svg';
    return SvgGenImage(path, size: const Size(24, 24));
  }

  void setEnabled(bool enable) {
    enabled = enable;
  }
}
