import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';

class LiveCareBookAppointment extends StatefulWidget {
  final dynamic clinicName;
  final dynamic liveCareClinicID;
  final dynamic liveCareServiceID;

  LiveCareBookAppointment(
      {this.clinicName, this.liveCareClinicID, this.liveCareServiceID});

  @override
  _LiveCareBookAppointmentState createState() =>
      _LiveCareBookAppointmentState();
}

class _LiveCareBookAppointmentState extends State<LiveCareBookAppointment> {
  AppSharedPreferences sharedPref = AppSharedPreferences();

  @override
  Widget build(BuildContext context) {
    return AppScaffold(
        appBarTitle: TranslationBase.of(context).bookAppo,
        isShowAppBar: true,
        isShowDecPage: false,
        body: SingleChildScrollView(
          child: Container(
            margin: EdgeInsets.all(10.0),
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.center,
              children: [
                Container(
                  margin: EdgeInsets.all(5.0),
                  child: Text(TranslationBase.of(context).clinicAcceptLivecare,
                      textAlign: TextAlign.center,
                      style: TextStyle(
                          color: Colors.black,
                          fontSize: 16.0,
                          letterSpacing: 0.5)),
                ),
                Container(
                  margin: EdgeInsets.all(15.0),
                  padding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
                  decoration: BoxDecoration(
                      color: Color(0xff20bc44),
                      borderRadius: BorderRadius.all(Radius.circular(8.0))),
                  child: Text(TranslationBase.of(context).livecareModalTop,
                      textAlign: TextAlign.center,
                      style: TextStyle(
                          color: Colors.white,
                          fontSize: 16.0,
                          fontWeight: FontWeight.w600,
                          letterSpacing: 0.5)),
                ),
                Container(
                  margin: EdgeInsets.all(15.0),
                  child: Row(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      Container(
                        child: SvgPicture.asset(
                            "assets/images/new-design/liveCare_mobile_care.svg",
                            width: 150.0),
                      ),
                      Container(
                        margin: EdgeInsets.only(left: 10.0, right: 10.0),
                        child: Column(
                          crossAxisAlignment: CrossAxisAlignment.start,
                          children: [
                            Container(
                              margin: EdgeInsets.only(bottom: 7.0),
                              child: Text(
                                  TranslationBase.of(context).whyLivecare,
                                  style: TextStyle(
                                      fontSize: 20.0,
                                      fontWeight: FontWeight.w600,
                                      letterSpacing: 1.0,
                                      color: Colors.black)),
                            ),
                            Row(
                              crossAxisAlignment: CrossAxisAlignment.start,
                              children: [
                                Container(
                                  child: SvgPicture.asset(
                                      "assets/images/new-design/ionic-ios-checkmark-circle.svg"),
                                ),
                                Container(
                                  width:
                                      MediaQuery.of(context).size.width * 0.4,
                                  margin: EdgeInsets.only(
                                      left: 5.0, right: 5.0, bottom: 10.0),
                                  child: Text(
                                      TranslationBase.of(context)
                                          .livecarePoint1,
                                      overflow: TextOverflow.clip,
                                      style: TextStyle(
                                          fontSize: 12.0,
                                          letterSpacing: 0.5,
                                          color: Colors.black)),
                                ),
                              ],
                            ),
                            Row(
                              crossAxisAlignment: CrossAxisAlignment.start,
                              children: [
                                Container(
                                  child: SvgPicture.asset(
                                      "assets/images/new-design/ionic-ios-checkmark-circle.svg"),
                                ),
                                Container(
                                  width:
                                      MediaQuery.of(context).size.width * 0.4,
                                  margin: EdgeInsets.only(
                                      left: 5.0, right: 5.0, bottom: 10.0),
                                  child: Text(
                                      TranslationBase.of(context)
                                          .livecarePoint5,
                                      overflow: TextOverflow.clip,
                                      style: TextStyle(
                                          fontSize: 12.0,
                                          letterSpacing: 0.5,
                                          color: Colors.black)),
                                ),
                              ],
                            ),
                            Row(
                              crossAxisAlignment: CrossAxisAlignment.start,
                              children: [
                                Container(
                                  child: SvgPicture.asset(
                                      "assets/images/new-design/ionic-ios-checkmark-circle.svg"),
                                ),
                                Container(
                                  width:
                                      MediaQuery.of(context).size.width * 0.4,
                                  margin: EdgeInsets.only(
                                      left: 5.0, right: 5.0, bottom: 10.0),
                                  child: Text(
                                      TranslationBase.of(context)
                                          .livecarePoint2,
                                      overflow: TextOverflow.clip,
                                      style: TextStyle(
                                          fontSize: 12.0,
                                          letterSpacing: 0.5,
                                          color: Colors.black)),
                                ),
                              ],
                            ),
                            Row(
                              crossAxisAlignment: CrossAxisAlignment.start,
                              children: [
                                Container(
                                  child: SvgPicture.asset(
                                      "assets/images/new-design/ionic-ios-checkmark-circle.svg"),
                                ),
                                Container(
                                  width:
                                      MediaQuery.of(context).size.width * 0.4,
                                  margin: EdgeInsets.only(
                                      left: 5.0, right: 5.0, bottom: 10.0),
                                  child: Text(
                                      TranslationBase.of(context)
                                          .livecarePoint3,
                                      overflow: TextOverflow.clip,
                                      style: TextStyle(
                                          fontSize: 12.0,
                                          letterSpacing: 0.5,
                                          color: Colors.black)),
                                ),
                              ],
                            ),
                            Row(
                              crossAxisAlignment: CrossAxisAlignment.start,
                              children: [
                                Container(
                                  child: SvgPicture.asset(
                                      "assets/images/new-design/ionic-ios-checkmark-circle.svg"),
                                ),
                                Container(
                                  width:
                                      MediaQuery.of(context).size.width * 0.4,
                                  margin:
                                      EdgeInsets.only(left: 5.0, right: 5.0),
                                  child: Text(
                                      TranslationBase.of(context)
                                          .livecarePoint4,
                                      overflow: TextOverflow.clip,
                                      style: TextStyle(
                                          fontSize: 12.0,
                                          letterSpacing: 0.5,
                                          color: Colors.black)),
                                ),
                              ],
                            ),
                          ],
                        ),
                      )
                    ],
                  ),
                ),
                Container(
                  child: Text(TranslationBase.of(context).livecareSummary,
                      overflow: TextOverflow.clip,
                      style: TextStyle(
                          fontSize: 12.0,
                          letterSpacing: 0.5,
                          color: Colors.black)),
                ),
                Container(
                  child: InkWell(
                    onTap: () {
                      sharedPref.setString(
                          LIVECARE_CLINIC_DATA,
                          widget.clinicName +
                              "-" +
                              widget.liveCareClinicID +
                              "-" +
                              widget.liveCareServiceID);
                      Navigator.pop(context, "livecare");
                    },
                    child: Container(
                        decoration: BoxDecoration(
                            color: Colors.grey[700],
                            borderRadius:
                                BorderRadius.all(Radius.circular(10.0))),
                        margin: EdgeInsets.only(top: 10.0),
                        padding: EdgeInsets.all(10.0),
                        child: Row(
                          children: <Widget>[
                            Container(
                              margin: EdgeInsets.only(left: 10.0, right: 10.0),
                              child: SvgPicture.asset(
                                  "assets/images/new-design/liveCare_logo_icon_white.svg",
                                  width: 70),
                            ),
                            Container(
                              width: MediaQuery.of(context).size.width * 0.58,
                              margin: EdgeInsets.fromLTRB(0.0, 5.0, 0.0, 0.0),
                              child: Column(
                                crossAxisAlignment: CrossAxisAlignment.start,
                                children: <Widget>[
                                  Container(
                                    margin: EdgeInsets.fromLTRB(
                                        10.0, 0.0, 10.0, 0.0),
                                    child: Text(
                                        TranslationBase.of(context)
                                            .bookImmediateLivecare,
                                        overflow: TextOverflow.clip,
                                        style: TextStyle(
                                            fontWeight: FontWeight.w500,
                                            fontSize: 16.0,
                                            letterSpacing: 0.7,
                                            color: Colors.white)),
                                  ),
                                  Container(
                                    margin:
                                        EdgeInsets.only(top: 5.0, left: 10.0),
                                    child: Text(
                                        TranslationBase.of(context)
                                            .bookVideoLivecare2,
                                        textAlign: TextAlign.start,
                                        style: TextStyle(
                                            fontSize: 13.0,
                                            color: Colors.white)),
                                  )
                                ],
                              ),
                            ),
                          ],
                        )),
                  ),
                ),
                Container(
                  child: InkWell(
                    onTap: () {
                      Navigator.pop(context, "schedule");
                    },
                    child: Container(
                        decoration: BoxDecoration(
                            color: Colors.grey[700],
                            borderRadius:
                                BorderRadius.all(Radius.circular(10.0))),
                        margin: EdgeInsets.only(top: 10.0),
                        padding: EdgeInsets.all(10.0),
                        child: Row(
                          children: <Widget>[
                            Container(
                              margin: EdgeInsets.only(left: 10.0, right: 10.0),
                              child: Image.asset(
                                  "assets/images/new-design/doctor_white.png",
                                  width: 50),
                            ),
                            Container(
                              width: MediaQuery.of(context).size.width * 0.58,
                              margin: EdgeInsets.fromLTRB(0.0, 5.0, 0.0, 0.0),
                              child: Column(
                                crossAxisAlignment: CrossAxisAlignment.start,
                                children: <Widget>[
                                  Container(
                                    margin: EdgeInsets.fromLTRB(
                                        28.0, 0.0, 28.0, 0.0),
                                    child: Text(
                                        TranslationBase.of(context).noThankyou,
                                        overflow: TextOverflow.clip,
                                        style: TextStyle(
                                            fontWeight: FontWeight.w500,
                                            fontSize: 16.0,
                                            letterSpacing: 0.7,
                                            color: Colors.white)),
                                  ),
                                  Container(
                                    margin: EdgeInsets.only(
                                        top: 5.0, left: 28.0, right: 28.0),
                                    child: Text(
                                        TranslationBase.of(context).visitClinic,
                                        textAlign: TextAlign.start,
                                        style: TextStyle(
                                            fontSize: 13.0,
                                            color: Colors.white)),
                                  )
                                ],
                              ),
                            ),
                          ],
                        )),
                  ),
                ),
                Container(
                  margin: EdgeInsets.only(top: 10.0),
                  child: InkWell(
                    onTap: () {
                      Navigator.pop(context, "false");
                    },
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.end,
                      children: [
                        Text(TranslationBase.of(context).cancel,
                            style: TextStyle(
                                fontSize: 16.0,
                                letterSpacing: 0.5,
                                color: Color(0xffc5272d))),
                      ],
                    ),
                  ),
                ),
              ],
            ),
          ),
        ));
  }
}
