import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

class MedicalReportDetailPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    ProjectViewModel projectViewModel = Provider.of(context);
    final routeArgs = ModalRoute.of(context).settings.arguments as Map;
    PatiantInformtion patient = routeArgs['patient'];
    String patientType = routeArgs['patientType'];
    String arrivalType = routeArgs['arrivalType'];

    return BaseView<BaseViewModel>(
      builder: (_, model, w) => AppScaffold(
        baseViewModel: model,
        isShowAppBar: true,
        appBar: PatientProfileHeaderNewDesignAppBar(
          patient,
          patientType,
          arrivalType,
        ),
        body: Container(
          child: SingleChildScrollView(
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                Container(
                  margin: EdgeInsets.all(16.0),
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      AppText(
                        "${TranslationBase.of(context).medical}",
                        fontSize: SizeConfig.textMultiplier * 1.6,
                        fontWeight: FontWeight.w700,
                        color: Color(0xFF2E303A),
                      ),
                      AppText(
                        TranslationBase.of(context).report,
                        fontSize: SizeConfig.textMultiplier * 3,
                        fontWeight: FontWeight.bold,
                        color: Color(0xFF2E303A),
                      )
                    ],
                  ),
                ),
                Container(
                  width: double.infinity,
                  margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
                  padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
                  decoration: BoxDecoration(
                    color: Colors.white,
                    shape: BoxShape.rectangle,
                    borderRadius: BorderRadius.all(Radius.circular(8)),
                    border: Border.fromBorderSide(
                      BorderSide(
                        color: Colors.white,
                        width: 1.0,
                      ),
                    ),
                  ),
                  child: Column(
                    children: [
                      AppText(
                        TranslationBase.of(context).chiefComplaints,
                        fontWeight: FontWeight.w700,
                        fontSize: 2.4 * SizeConfig.textMultiplier,
                        color: Color(0XFF2E303A),
                      ),
                      AppText(
                        "chief complaints data",
                        fontWeight: FontWeight.w600,
                        fontSize: 1.8 * SizeConfig.textMultiplier,
                        color: Color(0XFF2E303A),
                      ),
                      SizedBox(
                        height: 8,
                      ),
                      Row(
                        crossAxisAlignment: CrossAxisAlignment.start,
                        children: [
                          Container(
                            width: 30,
                            height: 30,
                            margin: EdgeInsets.only(
                                left: projectViewModel.isArabic ? 10 : 85,
                                right: projectViewModel.isArabic ? 85 : 10,
                                top: 5),
                            decoration: BoxDecoration(
                                shape: BoxShape.rectangle,
                                border: Border(
                                  bottom: BorderSide(
                                      color: Colors.grey[400], width: 2.5),
                                  left: BorderSide(
                                      color: Colors.grey[400], width: 2.5),
                                )),
                          ),
                          Expanded(
                            child: Container(
                              margin: EdgeInsets.only(top: 10),
                              child: Row(
                                crossAxisAlignment: CrossAxisAlignment.start,
                                children: [
                                  Container(
                                    child: LargeAvatar(
                                      name: "doctorName",
                                      url: "doctor avatar",
                                    ),
                                    width: 25,
                                    height: 25,
                                    margin: EdgeInsets.only(top: 10),
                                  ),
                                  Expanded(
                                    flex: 4,
                                    child: Container(
                                      margin: EdgeInsets.all(10),
                                      child: Column(
                                        crossAxisAlignment: CrossAxisAlignment.start,
                                        children: [
                                          AppText(
                                            '${TranslationBase.of(context).dr}. replace with doctor name',
                                            fontWeight: FontWeight.w800,
                                            fontSize: 1.7 * SizeConfig.textMultiplier,
                                            color: Colors.black,
                                          ),
                                          AppText(
                                            'replace clinic Description',
                                            fontWeight: FontWeight.w700,
                                            fontSize: 1.4 * SizeConfig.textMultiplier,
                                            color: Color(0XFF2E303A),
                                          ),
                                        ],
                                      ),
                                    ),
                                  ),
                                ],
                              ),
                            ),
                          ),
                        ],
                      ),
                    ],
                  ),
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }
}
