import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';

class MedicalFileCard extends StatelessWidget {
  final String label;

  // final Color svgColor;
  final Color textColor;
  final Color backgroundColor;
  final String svgIcon;

  MedicalFileCard({
    required this.label,
    // required this.svgColor,
    required this.textColor,
    required this.backgroundColor,
    this.svgIcon = "",
  });

  @override
  Widget build(BuildContext context) {
    return Container(
      decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
        color: backgroundColor,
        borderRadius: 20,
      ),
      child: Padding(
        padding: EdgeInsets.all(8.h),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Utils.buildSvgWithAssets(icon: svgIcon, width: 30.h, height: 30.h, fit: BoxFit.contain),
            SizedBox(height: 12.h),
            label.toText11(color: textColor, isBold: true),
          ],
        ),
      ),
    );
  }
}
