import 'package:doctor_app_flutter/config/config.dart';
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/utils/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:flutter/material.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return Column(children: [
      Row(children: [
        Expanded(
          child: AppButton(
            title: TranslationBase
                .of(context)
                .details,
            hasBorder: true,
            borderColor: AppGlobal.appGreenColor,
            color: AppGlobal.appGreenColor,
            fontColor: Colors.white,
            onPressed: () async {
              model.getInterventionHistory(
                  medication: medication
              );
            },
          ),
        ),
      ]),
    ]);
  }
}
