import '../../../../../../food_delivery_client.dart';

class WBottomNavbarItem extends StatelessWidget {
  const WBottomNavbarItem({
    super.key,
    required this.iconPath,
    required this.activeIconPath,
    required this.title,
    required this.isActive,
  });

  final String iconPath;
  final String activeIconPath;
  final String title;
  final bool isActive;

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        SizedBox(
          height: 24,
          width: 24,
          child: SvgPicture.asset(
            isActive ? activeIconPath : iconPath,
            fit: BoxFit.cover,
          ),
        ),
        8.verticalSpace,
        if (!isActive)
          Text(
            title,
            style: AppTextStyles.size12Medium.copyWith(
              height: 1.3,
              color: context.appThemeColors.inActiveColor1,
            ),
          ),
        if (isActive)
          ShaderMask(
            shaderCallback: (bounds) => AppUtils.kGradient.createShader(
              Rect.fromLTWH(0, 0, bounds.width, bounds.height),
            ),
            child: Text(
              title,
              style: AppTextStyles.size12Medium.copyWith(
                height: 1.3,
                color: isActive
                    ? AppColors.cFFFFFF
                    : context.appThemeColors.inActiveColor1,
              ),
            ),
          ),
      ],
    );
  }
}
