import 'dart:async';

import 'package:doctor_app_flutter/config/localized_values.dart';
import 'package:flutter/foundation.dart' show SynchronousFuture;
import 'package:flutter/material.dart';

class TranslationBase {
  TranslationBase(this.locale);

  final Locale locale;

  static TranslationBase of(BuildContext context) {
    return Localizations.of<TranslationBase>(context, TranslationBase);
  }

  String get dashboardScreenToolbarTitle =>
      localizedValues['dashboardScreenToolbarTitle'][locale.languageCode];

  String get settings => localizedValues['settings'][locale.languageCode];

  String get language => localizedValues['language'][locale.languageCode];

  String get lanEnglish => localizedValues['lanEnglish'][locale.languageCode];

  String get lanArabic => localizedValues['lanArabic'][locale.languageCode];

  String get doctorReply => localizedValues['doctorReply'][locale.languageCode];

  String get time => localizedValues['time'][locale.languageCode];

  String get fileNo => localizedValues['fileNo'][locale.languageCode];

  String get mobileNo => localizedValues['mobileNo'][locale.languageCode];

  String get messagesScreenToolbarTitle =>
      localizedValues['messagesScreenToolbarTitle'][locale.languageCode];

  String get mySchedule => localizedValues['mySchedule'][locale.languageCode];

  String get errorNoSchedule =>
      localizedValues['errorNoSchedule'][locale.languageCode];

  String get verify => localizedValues['verify'][locale.languageCode];
  String get referralDoctor =>
      localizedValues['referralDoctor'][locale.languageCode];
  String get referringClinic =>
      localizedValues['referringClinic'][locale.languageCode];
  String get frequency => localizedValues['frequency'][locale.languageCode];
  String get priority => localizedValues['priority'][locale.languageCode];
  String get maxResponseTime =>
      localizedValues['maxResponseTime'][locale.languageCode];
  String get clinicDetailsandRemarks =>
      localizedValues['clinicDetailsandRemarks'][locale.languageCode];
  String get answerSuggestions =>
      localizedValues['answerSuggestions'][locale.languageCode];
  String get outPatients => localizedValues['outPatients'][locale.languageCode];
  String get searchPatient =>
      localizedValues['searchPatient'][locale.languageCode];
  String get labResult => localizedValues['labResult'][locale.languageCode];
  String get todayStatistics =>
      localizedValues['todayStatistics'][locale.languageCode];
  String get familyMedicine =>
      localizedValues['familyMedicine'][locale.languageCode];
  String get arrived => localizedValues['arrived'][locale.languageCode];
  String get er => localizedValues['er'][locale.languageCode];
  String get walkIn => localizedValues['walkIn'][locale.languageCode];
  String get notArrived => localizedValues['notArrived'][locale.languageCode];
  String get radiology => localizedValues['radiology'][locale.languageCode];
  String get referral => localizedValues['referral'][locale.languageCode];
  String get inPatient => localizedValues['inPatient'][locale.languageCode];
  String get operations => localizedValues['operations'][locale.languageCode];
  String get patientServices =>
      localizedValues['patientServices'][locale.languageCode];
  String get searchMedicine =>
      localizedValues['searchMedicine'][locale.languageCode];
  String get myReferralPatient =>
      localizedValues['myReferralPatient'][locale.languageCode];
  String get myReferredPatient =>
      localizedValues['myReferredPatient'][locale.languageCode];
  String get firstName => localizedValues['firstName'][locale.languageCode];
  String get middleName => localizedValues['middleName'][locale.languageCode];
  String get lastName => localizedValues['lastName'][locale.languageCode];
  String get phoneNumber => localizedValues['phoneNumber'][locale.languageCode];
  String get patientID => localizedValues['patientID'][locale.languageCode];
  String get patientFile => localizedValues['patientFile'][locale.languageCode];
  String get search => localizedValues['search'][locale.languageCode];
  String get onlyArrivedPatient =>
      localizedValues['onlyArrivedPatient'][locale.languageCode];
  String get searchMedicineNameHere =>
      localizedValues['searchMedicineNameHere'][locale.languageCode];
  String get youCanFind => localizedValues['youCanFind'][locale.languageCode];
  String get itemsInSearch =>
      localizedValues['itemsInSearch'][locale.languageCode];
  String get qrReader => localizedValues['qrReader'][locale.languageCode];
  String get startScanning =>
      localizedValues['startScanning'][locale.languageCode];
  String get scanQrCode => localizedValues['scanQrCode'][locale.languageCode];
  String get scanQr => localizedValues['scanQr'][locale.languageCode];
  String get profile => localizedValues['profile'][locale.languageCode];
  String get gender => localizedValues['gender'][locale.languageCode];
  String get clinic => localizedValues['clinic'][locale.languageCode];
  String get hospital => localizedValues['hospital'][locale.languageCode];
  String get speciality => localizedValues['speciality'][locale.languageCode];
  String get errorMessage =>
      localizedValues['errorMessage'][locale.languageCode];
  String get patientProfile =>
      localizedValues['patientProfile'][locale.languageCode];
  String get vitalSign => localizedValues['vitalSign'][locale.languageCode];
  String get labOrder => localizedValues['labOrder'][locale.languageCode];
  String get prescription =>
      localizedValues['prescription'][locale.languageCode];
  String get insuranceApprovals =>
      localizedValues['insuranceApprovals'][locale.languageCode];
  String get bodyMeasurements =>
      localizedValues['bodyMeasurements'][locale.languageCode];
  String get temperature => localizedValues['temperature'][locale.languageCode];
  String get pulse => localizedValues['pulse'][locale.languageCode];
  String get respiration => localizedValues['respiration'][locale.languageCode];
  String get bloodPressure =>
      localizedValues['bloodPressure'][locale.languageCode];
  String get oxygenation => localizedValues['oxygenation'][locale.languageCode];
  String get painScale => localizedValues['painScale'][locale.languageCode];
  String get errorNoVitalSign =>
      localizedValues['errorNoVitalSign'][locale.languageCode];
  String get labOrders => localizedValues['labOrders'][locale.languageCode];
  String get errorNoLabOrders =>
      localizedValues['errorNoLabOrders'][locale.languageCode];
  String get answerThePatient =>
      localizedValues['answerThePatient'][locale.languageCode];
  String get pleaseEnterAnswer =>
      localizedValues['pleaseEnterAnswer'][locale.languageCode];
  String get replay => localizedValues['replay'][locale.languageCode];
  String get progressNote =>
      localizedValues['progressNote'][locale.languageCode];
  String get searchNote => localizedValues['searchNote'][locale.languageCode];
  String get errorNoProgressNote =>
      localizedValues['errorNoProgressNote'][locale.languageCode];
  String get invoiceNo => localizedValues['invoiceNo:'][locale.languageCode];
  String get generalResult =>
      localizedValues['generalResult'][locale.languageCode];
  String get description => localizedValues['description'][locale.languageCode];
  String get value => localizedValues['value'][locale.languageCode];
  String get range => localizedValues['range'][locale.languageCode];
  String get enterId => localizedValues['enterId'][locale.languageCode];
  String get pleaseEnterYourID =>
      localizedValues['pleaseEnterYourID'][locale.languageCode];
  String get enterPassword =>
      localizedValues['enterPassword'][locale.languageCode];
  String get pleaseEnterPassword =>
      localizedValues['pleaseEnterPassword'][locale.languageCode];
  String get selectYourProject =>
      localizedValues['selectYourProject'][locale.languageCode];
  String get pleaseEnterYourProject =>
      localizedValues['pleaseEnterYourProject'][locale.languageCode];
  String get login => localizedValues['login'][locale.languageCode];
  String get drSulaimanAlHabib =>
      localizedValues['drSulaimanAlHabib'][locale.languageCode];
  String get welcomeTo => localizedValues['welcomeTo'][locale.languageCode];
  String get welcomeBackTo =>
      localizedValues['welcomeBackTo'][locale.languageCode];
  String get home => localizedValues['home'][locale.languageCode];
  String get services => localizedValues['services'][locale.languageCode];
  String get sms => localizedValues['sms'][locale.languageCode];
  String get fingerprint => localizedValues['fingerprint'][locale.languageCode];
  String get faceId => localizedValues['faceId'][locale.languageCode];
  String get whatsApp => localizedValues['whatsApp'][locale.languageCode];
  String get whatsAppBy => localizedValues['whatsAppBy'][locale.languageCode];
  String get pleaseChoose =>
      localizedValues['pleaseChoose'][locale.languageCode];
  String get choose => localizedValues['choose'][locale.languageCode];
  String get verification =>
      localizedValues['verification'][locale.languageCode];
  String get firstStep => localizedValues['firstStep'][locale.languageCode];
  String get yourAccount =>
      localizedValues['yourAccount!'][locale.languageCode];
  String get verify1 => localizedValues['verify1'][locale.languageCode];
  String get youWillReceiveA =>
      localizedValues['youWillReceiveA'][locale.languageCode];
  String get loginCode => localizedValues['loginCode'][locale.languageCode];
  String get smsBy => localizedValues['smsBy'][locale.languageCode];
  String get pleaseEnterTheCode =>
      localizedValues['pleaseEnterTheCode'][locale.languageCode];
  String get youDontHaveAnyPatient =>
      localizedValues['youDon\'tHaveAnyPatient'][locale.languageCode];

  String get age => localizedValues['age'][locale.languageCode];
  String get today => localizedValues['today'][locale.languageCode];
  String get tomorrow => localizedValues['tomorrow'][locale.languageCode];
  String get all => localizedValues['all'][locale.languageCode];
  String get nextWeek => localizedValues['nextWeek'][locale.languageCode];
  String get yesterday => localizedValues['yesterday'][locale.languageCode];
  String get errorNoInsuranceApprovals =>
      localizedValues['errorNoInsuranceApprovals'][locale.languageCode];
  String get searchInsuranceApprovals =>
      localizedValues['searchInsuranceApprovals'][locale.languageCode];
  String get status => localizedValues['status'][locale.languageCode];
  String get expiryDate => localizedValues['expiryDate'][locale.languageCode];
  String get producerName =>
      localizedValues['producerName'][locale.languageCode];
  String get receiptOn => localizedValues['receiptOn'][locale.languageCode];
  String get approvalNo => localizedValues['approvalNo'][locale.languageCode];
  String get doctor => localizedValues['doctor'][locale.languageCode];
  String get ext => localizedValues['ext'][locale.languageCode];
  String get veryUrgent => localizedValues['veryUrgent'][locale.languageCode];
  String get urgent => localizedValues['urgent'][locale.languageCode];
  String get routine => localizedValues['routine'][locale.languageCode];
  String get send => localizedValues['send'][locale.languageCode];
  String get referralFrequency =>
      localizedValues['referralFrequency'][locale.languageCode];
  String get clinicalDetailsAndRemarks =>
      localizedValues['clinicalDetailsAndRemarks'][locale.languageCode];
  String get remarks => localizedValues['remarks'][locale.languageCode];
  String get pleaseFill => localizedValues['pleaseFill'][locale.languageCode];
  String get replay2 => localizedValues['replay2'][locale.languageCode];
  String get outPatient => localizedValues['outPatient'][locale.languageCode];
  String get logout => localizedValues['logout'][locale.languageCode];
  String get pharmaciesList =>
      localizedValues['pharmaciesList'][locale.languageCode];
  String get price => localizedValues['price'][locale.languageCode];
  String get youCanFindItIn =>
      localizedValues['youCanFindItIn'][locale.languageCode];
  String get radiologyReport =>
      localizedValues['radiologyReport'][locale.languageCode];
  String get orders => localizedValues['orders'][locale.languageCode];
  String get searchOrders =>
      localizedValues['searchOrders'][locale.languageCode];
  String get prescriptionDetails =>
      localizedValues['prescriptionDetails'][locale.languageCode];
  String get prescriptionInfo =>
      localizedValues['prescriptionInfo'][locale.languageCode];
  String get errorNoOrders =>
      localizedValues['errorNoOrders'][locale.languageCode];
  String get livecare => localizedValues['livecare'][locale.languageCode];
  String get beingBad => localizedValues['beingBad'][locale.languageCode];
  String get beingGreat => localizedValues['beingGreat'][locale.languageCode];
}

class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {
  const TranslationBaseDelegate();

  @override
  bool isSupported(Locale locale) => ['en', 'ar'].contains(locale.languageCode);

  @override
  Future<TranslationBase> load(Locale locale) {
    return SynchronousFuture<TranslationBase>(TranslationBase(locale));
  }

  @override
  bool shouldReload(TranslationBaseDelegate old) => false;
}
