import 'package:flutter/material.dart';
import 'package:food_health/config/theme/custom_colors.dart';
import 'package:markdown_widget/widget/markdown.dart';
import 'package:remixicon/remixicon.dart';

import '../../../../api/dto/food_scan_dto.dart';

class HealthRecommend extends StatelessWidget {
  final FoodScanDto detail;

  const HealthRecommend({super.key, required this.detail});

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.only(top: 20),
      padding: EdgeInsets.all(15),
      decoration: BoxDecoration(
        color: Theme.of(context).colorScheme.surface,
        borderRadius: BorderRadius.circular(8),
        boxShadow: [
          BoxShadow(
            color: Theme.of(context).colorScheme.shadow,
            blurRadius: 10,
            offset: Offset(0, 4),
          ),
        ],
      ),
      child: Column(
        children: [
          Row(
            spacing: 10,
            children: [
              Icon(
                RemixIcons.heart_line,
                color: Theme.of(context).colorScheme.danger,
              ),
              Text(
                "Health Recommendations",
                style: Theme.of(context).textTheme.titleMedium,
              ),
            ],
          ),
          MarkdownWidget(
            shrinkWrap: true,
            physics: NeverScrollableScrollPhysics(),
            data: detail.suggestions ?? "",
          ),
        ],
      ),
    );
  }
}
