import 'package:doctor_app_flutter/core/model/pharmacy-intervention-model/pharmacy_intervention_item.dart';
import 'package:doctor_app_flutter/screens/pharmacy_intervention/viewmodel/pharmacy_intervention_view_model.dart';
import 'package:doctor_app_flutter/screens/pharmacy_intervention/widgets/InterventionCardBody.dart';
import 'package:doctor_app_flutter/screens/pharmacy_intervention/widgets/InterventionCardFooter.dart';
import 'package:flutter/material.dart';

class InterventionCardItem extends StatelessWidget {
  final Medication medication;
  final PharmacyInterventionViewModel model;

  const InterventionCardItem(
      {super.key, required this.medication, required this.model});

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: const EdgeInsets.all(8.0),
      child: Card(
        color: Colors.white,
        elevation: 5,
        shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
        child: Padding(
          padding: const EdgeInsets.all(8.0),
          child: Column(
            children: [
              InterventionCardBody(
                medication: medication,
                model: model,
              ),
              InterventionCardFooter(
                model: model,
                medication: medication,
              )
            ],
          ),
        ),
      ),
    );
  }
}