// ignore_for_file: prefer_const_constructors, non_constant_identifier_names

import 'package:flutter/material.dart';

class Constant {
  static double designHeight = 1024;
  static double designWidth = 1440;

  static double designHeightPhone = 844;
  static double designWidthPhone = 390;

  static String bearerName = "petty-cash";
  static String version = "1.00";

  // static String baseUrl = "https://devregonline.pramita.co.id/one-api/xdoc/";

  // tester devbandungraya
  static String baseUrlDevone =
      "http://devone.aplikasi.web.id/one-api-pettycash/pettycash/";

  // static String baseUrl_appdoctor =
  //     "http://devbandungraya.aplikasi.web.id/one-api/app_doctor/";

  // * surabaya
  // static String baseUrl =
  //     "http://surabaya.bisone.pramitalab.id/one-api-doctor/doctor_mitra/";

  // static String baseUrl_appdoctor =
  //     "http://surabaya.bisone.pramitalab.id/one-api/app_doctor/";

  // * jakarta
  // static String baseUrl =
  //     "http://jakarta.bisone2.pramitalab.id/one-api-doctor/doctor_mitra/";

  // static String baseUrl_appdoctor =
  //     "http://jakarta.bisone2.pramitalab.id/one-api/app_doctor/";

  // * bandung
  // static String baseUrl =
  //     "http://bandung.bisone3.pramitalab.id/one-api-doctor/doctor_mitra/";

  // static String baseUrl_appdoctor =
  //     "http://bandung.bisone3.pramitalab.id/one-api/app_doctor/";

  // * salatiga
  // static String baseUrl =
  //     "http://salatigaraya.bisone7.pramitalab.id/one-api-doctor/doctor_mitra/";

  // static String baseUrl_appdoctor =
  //     "http://salatigaraya.bisone7.pramitalab.id/one-api/app_doctor/";

  // * semarang
  // static String baseUrl =
  //     "http://semarang.bisone7.pramitalab.id/one-api-doctor/doctor_mitra/";

  // static String baseUrl_appdoctor =
  //     "http://semarang.bisone7.pramitalab.id/one-api/app_doctor/";

  // * magelang
  // static String baseUrl =
  //     "http://magelang.bisone7.pramitalab.id/one-api-doctor/doctor_mitra/";

  // static String baseUrl_appdoctor =
  //     "http://magelang.bisone7.pramitalab.id/one-api/app_doctor/";

  // // * tegal
  // static String baseUrl =
  //     "http://tegal.bisone7.pramitalab.id/one-api-doctor/doctor_mitra/";

  // static String baseUrl_appdoctor =
  //     "http://tegal.bisone7.pramitalab.id/one-api/app_doctor/";

  // // * cirebon
  // static String baseUrl =
  //     "http://cirebon.bisone4.pramitalab.id/one-api-doctor/doctor_mitra/";

  // static String baseUrl_appdoctor =
  //     "http://cirebon.bisone4.pramitalab.id/one-api/app_doctor/";

  // // * tasik
  // static String baseUrl =
  //     "http://tasikmalaya.bisone2.pramitalab.id/one-api-doctor/doctor_mitra/";

  // static String baseUrl_appdoctor =
  //     "http://tasikmalaya.bisone2.pramitalab.id/one-api/app_doctor/";

  // // * jogja
  // static String baseUrl =
  //     "http://jogja.bisone.pramitalab.id/one-api-doctor/doctor_mitra/";

  // static String baseUrl_appdoctor =
  //     "http://jogja.bisone.pramitalab.id/one-api/app_doctor/";

  // // * bali
  // static String baseUrl =
  //     "http://bali.bisone.pramitalab.id/one-api-doctor/doctor_mitra/";

  // static String baseUrl_appdoctor =
  //     "http://bali.bisone.pramitalab.id/one-api/app_doctor/";

  // // * medan
  // static String baseUrl =
  //     "http://medan.bisone4.pramitalab.id/one-api-doctor/doctor_mitra/";

  // static String baseUrl_appdoctor =
  //     "http://medan.bisone4.pramitalab.id/one-api/app_doctor/";

  // // * palembang
  // static String baseUrl =
  //     "http://palembang.bisone5.pramitalab.id/one-api-doctor/doctor_mitra/";

  // static String baseUrl_appdoctor =
  //     "http://palembang.bisone5.pramitalab.id/one-api/app_doctor/";

  // // * pontianak
  // static String baseUrl =
  //     "http://pontianakraya.bisone2.pramitalab.id/one-api-doctor/doctor_mitra/";

  // static String baseUrl_appdoctor =
  //     "http://pontianakraya.bisone2.pramitalab.id/one-api/app_doctor/";

  // // * balikpapan
  // static String baseUrl =
  //     "http://balikpapan.bisone2.pramitalab.id/one-api-doctor/doctor_mitra/";

  // static String baseUrl_appdoctor =
  //     "http://balikpapan.bisone2.pramitalab.id/one-api/app_doctor/";

  // // * padang
  // static String baseUrl =
  //     "http://padang.bisone4.pramitalab.id/one-api-doctor/doctor_mitra/";

  // static String baseUrl_appdoctor =
  //     "http://padang.bisone4.pramitalab.id/one-api/app_doctor/";

  // // * pekanbaru
  // static String baseUrl =
  //     "http://pekanbaru.bisone4.pramitalab.id/one-api-doctor/doctor_mitra/";

  // static String baseUrl_appdoctor =
  //     "http://pekanbaru.bisone4.pramitalab.id/one-api/app_doctor/";

  // // * makassar
  // static String baseUrl =
  //     "http://makassar.bisone2.pramitalab.id/one-api-doctor/doctor_mitra/";

  // static String baseUrl_appdoctor =
  //     "http://makassar.bisone2.pramitalab.id/one-api/app_doctor/";

  // // * manado
  // static String baseUrl =
  //     "http://manado.bisone2.pramitalab.id/one-api-doctor/doctor_mitra/";

  // static String baseUrl_appdoctor =
  //     "http://manado.bisone2.pramitalab.id/one-api/app_doctor/";

  // * bekasi
  // static String baseUrl =
  //     "http://bekasiraya.bisone2.pramitalab.id/one-api-doctor/doctor_mitra/";

  // static String baseUrl_appdoctor =
  //     "http://bekasiraya.bisone2.pramitalab.id/one-api/app_doctor/";

  //color Theme
  // login marketing
  static Color subTitleBlack = const Color(0xff000000);
  static Color backgroundColor = const Color(0xffFFFFFF);
  static Color buttonLoginBackgroundColor = const Color(0xffE61301);

  static Color buttonRedBackgroundColor = const Color(0xffd90504);
  static Color textLoginColor = const Color(0xffFFFFFF);
  static Color shadowLoginMarketing = Colors.grey.withOpacity(0.3);
  static Color boxDecorationShadowLoginMaketing = Colors.blueGrey;
  static Color textRedProblemMaketing = const Color(0xffE61301);

  // home
  static Color backgroundColorWelcome = const Color(0xffE61301);
  static Color textMonthToDate = const Color(0xff80848E);
  static Color textListStatusOrder = const Color(0xff070708);
  static Color confirmed = const Color(0xff0BAF48);
  static Color backgroundTotalOrderRight = const Color(0xffF6F5F5);
  static Color dividerHorizontal = const Color(0xffF4F6F8);
  static Color backgroundTopHome = const Color(0xffFEF0EB);

  // order detail
  static Color textOrderDetail = const Color(0xff7E7F81);
  static Color cardConfirmed = const Color(0xffEBF9F0);
  static Color cardUnconfirmed = const Color(0xffFEF0EB);
  static Color textDropdown = const Color(0xff282828);

  // pendaftaran Pasien
  static Color textCardPendaftaranPasien = const Color(0xff2E2D2D);
  // static Color cardColorPendaftaranPasien = const Color(0xffFDFDFD);
  static Color cardColorPendaftaranPasien = const Color(0xffF4F6F8);
  static Color floatingbg = const Color(0xffDC2626);

  // pendaftaran pasien - demografi
  static Color backgroundCardNetral1_100 = const Color(0xffD1D2D6);
  static Color backgroundCardGreen_600 = const Color(0xff0BAF48);

  // divider
  static Color dividerColor = Color(0xffD1D2D6);

  // grey
  static Color greyColor = Color(0xff80848E);
  static Color chipText = Color(0xff637381);

  // chip bg color
  static Color chipBg = Color(0xffEDEFF2);

  // checkbox color
  static Color checkboxActive = Colors.red;
  static Color checkboxCheck = Colors.white;
  static Color checkboxSelected = Colors.red.shade100;

  // icon file
  static Color fileColor = Color(0xFF087D33);

  // fixing color
  static Color red_100 = Color(0xffFFB9B3);
  static Color red_200 = Color(0xffFE8A80);
  static Color red_300 = Color(0xffFE5B4D);
  static Color red_400 = Color(0xffFE2C1A);
  static Color red_500 = Color(0xffE61301);
  static Color red_600 = Color(0xffB20F01);
  static Color red_700 = Color(0xff7F0A01);
  static Color red_800 = Color(0xff4C0600);
  static Color red_900 = Color(0xff190200);

  static Color green_100 = Color(0xffBCFBD3);
  static Color green_200 = Color(0xff8CF8B4);
  static Color green_300 = Color(0xff5CF595);
  static Color green_400 = Color(0xff2CF275);
  static Color green_500 = Color(0xff0EDD5B);
  static Color green_600 = Color(0xff0BAF48);
  static Color green_700 = Color(0xff087D33);
  static Color green_800 = Color(0xff054D20);
  static Color green_900 = Color(0xff021D0C);

  static Color netral_100 = Color(0xffD1D2D6);
  static Color netral_200 = Color(0xffB6B8BE);
  static Color netral_300 = Color(0xff9B9EA6);
  static Color netral_400 = Color(0xff80848E);
  static Color netral_500 = Color(0xff676A74);
  static Color netral_600 = Color(0xff4F5259);
  static Color netral_700 = Color(0xff37393E);
  static Color netral_800 = Color(0xff1F2023);
  static Color netral_900 = Color(0xff070708);

  static Color white = Color(0xffFDFDFD);

  static Color textBlack = Color(0xff070708);
  static Color textRed = Color(0xffE61301);
  static Color textGrey = Color(0xff80848E);
  static Color textWhite = Color(0xffFDFDFD);
  static Color textGreen = Color(0xff0BAF48);
  static Color textGreyv2 = Color(0xff637381);
  static Color pcBtnBackgroundColor = Color(0xffF15A29);

  // background upload file
  static Color bgUploadFile = Color.fromRGBO(207, 207, 207, 0.20);

  //typoGraphy
  static TextStyle titleH1Login({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 24),
      fontWeight: FontWeight.w700,
    );
  }

  static TextStyle titleH3_700({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 24),
      fontWeight: FontWeight.w700,
    );
  }

  static TextStyle titleH3_700V2({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 32),
      fontWeight: FontWeight.w700,
    );
  }

  static TextStyle titleH3_700GantiPassword({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 14),
      fontWeight: FontWeight.w500,
    );
  }

  static TextStyle titleH3_700SignOut({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 30),
      fontWeight: FontWeight.w600,
    );
  }

  static TextStyle titleH4Login({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 16),
      fontWeight: FontWeight.w400,
    );
  }

  // homescreen
  static TextStyle titleLast30Days({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 16),
      fontWeight: FontWeight.w700,
    );
  }

  static TextStyle titleH4_500({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 20),
      fontWeight: FontWeight.w500,
    );
  }

  static TextStyle H4_500({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 20),
      fontWeight: FontWeight.w500,
    );
  }

  static TextStyle H4_600({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 20),
      fontWeight: FontWeight.w600,
    );
  }

  static TextStyle H4_700V2({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 28),
      fontWeight: FontWeight.w700,
    );
  }

  static TextStyle titleH5({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 18),
      fontWeight: FontWeight.w500,
    );
  }

  static TextStyle caption1_400({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 11),
      fontWeight: FontWeight.w400,
    );
  }

  static TextStyle caption3_500({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 9),
      fontWeight: FontWeight.w500,
    );
  }

  static TextStyle titleH2({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 32),
      fontWeight: FontWeight.w500,
    );
  }

  static TextStyle titleH1Login_SelamatDatang({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 32),
      fontWeight: FontWeight.w500,
    );
  }

  static TextStyle titleH1_600({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 36),
      fontWeight: FontWeight.w600,
    );
  }

  static TextStyle body3({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 12),
      fontWeight: FontWeight.w400,
    );
  }

  static TextStyle body1({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 16),
      fontWeight: FontWeight.w500,
    );
  }

  static TextStyle body1_400({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 16),
      fontWeight: FontWeight.w400,
    );
  }

  static TextStyle body1_400_dibulan({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 14),
      fontWeight: FontWeight.w400,
    );
  }

  static TextStyle body1_600({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 16),
      fontWeight: FontWeight.w600,
    );
  }

  static TextStyle body1_500({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 16),
      fontWeight: FontWeight.w500,
    );
  }

  static TextStyle body2_400({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 14),
      fontWeight: FontWeight.w400,
    );
  }

  static TextStyle titleH3({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 24),
      fontWeight: FontWeight.w500,
    );
  }

  static TextStyle titleH3_600({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 24),
      fontWeight: FontWeight.w600,
    );
  }

  static TextStyle H3_600({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 24),
      fontWeight: FontWeight.w600,
    );
  }

  static TextStyle H3_500({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 24),
      fontWeight: FontWeight.w500,
    );
  }

  static TextStyle H5_500({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 18),
      fontWeight: FontWeight.w500,
    );
  }

  static TextStyle body2({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 14),
      fontWeight: FontWeight.w400,
    );
  }

  static TextStyle body2_500({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 14),
      fontWeight: FontWeight.w400,
    );
  }

  static TextStyle body2_500_italic({required BuildContext context}) {
    return TextStyle(
        fontSize: Constant.getActualYPhone(context: context, y: 14),
        fontWeight: FontWeight.w400,
        fontStyle: FontStyle.italic);
  }

  static TextStyle body1_700({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 16),
      fontWeight: FontWeight.w700,
    );
  }

  static TextStyle H3_700({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 24),
      fontWeight: FontWeight.w700,
    );
  }

  static TextStyle body3_400({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 12),
      fontWeight: FontWeight.w400,
    );
  }

  static TextStyle body3_500({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 12),
      fontWeight: FontWeight.w500,
    );
  }

  static TextStyle titleH7_700({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 12),
      fontWeight: FontWeight.w700,
    );
  }

  // pendaftaran pasien
  static TextStyle titleH5_600({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 18),
      fontWeight: FontWeight.w600,
    );
  }

  // demografi
  static TextStyle body2_600({required BuildContext context}) {
    return TextStyle(
      fontSize: Constant.getActualYPhone(context: context, y: 14),
      fontWeight: FontWeight.w600,
    );
  }

  //size convertion
  static double getActualX({
    required BuildContext context,
    required double x,
  }) {
    return x / designWidth * MediaQuery.of(context).size.width;
  }

  static double getActualY({
    required BuildContext context,
    required double y,
  }) {
    return y / designHeight * MediaQuery.of(context).size.height;
  }

  static double getActualXPhone({
    required BuildContext context,
    required double x,
  }) {
    return x / designWidthPhone * MediaQuery.of(context).size.width;
  }

  static double getActualYPhone({
    required BuildContext context,
    required double y,
  }) {
    return y / designHeightPhone * MediaQuery.of(context).size.height;
  }
}
