import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/PostEpisodeReqModel.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart';
import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';

import '../../../config/size_config.dart';
import '../../shared/app_texts_widget.dart';

class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
  final String from;
  final String to;
  final PatiantInformtion patient;
  final String patientType;
  final String arrivalType;

  ProfileMedicalInfoWidgetInPatient(
      {Key key,
      this.patient,
      this.patientType,
      this.arrivalType,
      this.from,
      this.to});

  @override
  Widget build(BuildContext context) {
    return BaseView<SOAPViewModel>(
      onModelReady: (model) async {},
      builder: (_, model, w) => GridView.count(
        shrinkWrap: true,
        physics: NeverScrollableScrollPhysics(),
        crossAxisSpacing: 10,
        mainAxisSpacing: 10,
        childAspectRatio: 1 / 1.0,
        crossAxisCount: 3,
        children: [
          PatientProfileButton(
              key: key,
              patient: patient,
              patientType: patientType,
              arrivalType: arrivalType,
              from: from,
              to: to,
              nameLine1: TranslationBase.of(context).vital,
              nameLine2: TranslationBase.of(context).signs,
              route: VITAL_SIGN_DETAILS,
              icon: 'patient/vital_signs.png'),
          PatientProfileButton(
              key: key,
              patient: patient,
              patientType: patientType,
              arrivalType: arrivalType,
              route: LAB_RESULT,
              nameLine1: TranslationBase.of(context).lab,
              nameLine2: TranslationBase.of(context).result,
              icon: 'patient/lab_results.png'),
          PatientProfileButton(
              key: key,
              patient: patient,
              patientType: patientType,
              arrivalType: arrivalType,
              route: RADIOLOGY_PATIENT,
              nameLine1: TranslationBase.of(context).radiology,
              nameLine2: TranslationBase.of(context).result,
              icon: 'patient/health_summary.png'),
          PatientProfileButton(
              key: key,
              patient: patient,
              patientType: patientType,
              arrivalType: arrivalType,
              route: ORDER_PRESCRIPTION_NEW,
              nameLine1: TranslationBase.of(context).patient,
              nameLine2: TranslationBase.of(context).prescription,
              icon: 'patient/order_prescription.png'),
          PatientProfileButton(
                key: key,
                patient: patient,
                patientType: patientType,
                arrivalType: arrivalType,
                route: PROGRESS_NOTE,
                nameLine1: TranslationBase.of(context).progress,
                nameLine2: TranslationBase.of(context).note,
                icon: 'patient/Progress_notes.png'),
          PatientProfileButton(
              key: key,
              patient: patient,
              patientType: patientType,
              arrivalType: arrivalType,
              route: null,
              nameLine1: "Text",
              nameLine2: TranslationBase.of(context).orders,
              icon: 'patient/Progress_notes.png'),
          PatientProfileButton(
              key: key,
              patient: patient,
              patientType: patientType,
              arrivalType: arrivalType,
              route: ORDER_PROCEDURE,
              nameLine1: TranslationBase.of(context).orders,
              nameLine2: TranslationBase.of(context).procedures,
              icon: 'patient/Order_Procedures.png'),
          PatientProfileButton(
              key: key,
              patient: patient,
              patientType: patientType,
              arrivalType: arrivalType,
              route: MEDICAL_FILE,
              nameLine1: "Medical",
              //TranslationBase.of(context).medicalReport,
              nameLine2: "Report",
              //TranslationBase.of(context).summaryReport,
              icon: 'patient/health_summary.png'),
          PatientProfileButton(
              key: key,
              patient: patient,
              patientType: patientType,
              arrivalType: arrivalType,
              route: MEDICAL_FILE,
              nameLine1: "Health",
              //TranslationBase.of(context).medicalReport,
              nameLine2: "Summery",
              //TranslationBase.of(context).summaryReport,
              icon: 'patient/health_summary.png'),
          PatientProfileButton(
              key: key,
              patient: patient,
              patientType: patientType,
              arrivalType: arrivalType,
              route: REFER_PATIENT_TO_DOCTOR,
              nameLine1: TranslationBase.of(context).referral,
              nameLine2: TranslationBase.of(context).patient,
              icon: 'patient/refer_patient.png'),
          PatientProfileButton(
              key: key,
              patient: patient,
              patientType: patientType,
              arrivalType: arrivalType,
              route: PATIENT_INSURANCE_APPROVALS_NEW,
              nameLine1: TranslationBase.of(context).insurance,
              nameLine2: TranslationBase.of(context).approvals,
              icon: 'patient/vital_signs.png'),
          PatientProfileButton(
                key: key,
                patient: patient,
                patientType: patientType,
                arrivalType: arrivalType,
                isDisable: true,
                route: null,
                nameLine1: "Discharge",
                nameLine2: "Summery",
                icon: 'patient/patient_sick_leave.png'),
        ],
      ),
    );
  }
}
