import CheckEmailForPasswordReset from "../../components/modals/email/CheckEmailForPasswordReset";
import CheckEmailForVerify from "../../components/modals/email/CheckEmailForVerify";
import EmailOTPVerification from "../../components/modals/email/EmailOTPVerification";
import EnterMailForResendLink from "../../components/modals/email/EnterMailForResendLink";
import EnterNewEmail from "../../components/modals/email/EnterNewEmail";
import ForgotPasswordForm from "../../components/modals/auth/ForgotPasswordForm";
import LoginForm from "../../components/modals/auth/LoginForm";
import PasswordUpdated from "../../components/modals/auth/PasswordUpdated";
import ResetPasswordForm from "../../components/modals/auth/ResetPasswordForm";
import SignupForm from "../../components/modals/auth/SignupForm";
import VerifyEmailModal from "../../components/modals/email/VerifyEmail";
import NewEmailOtpVerification from "../../components/modals/email/NewEmailOtpVerification";
import EmailUpdated from "../../components/modals/email/EmailUpdated";
import BuyCreditsModal from "../../components/modals/credits/BuyCreditsModal";
import ThankYouPaymentModal from "../../components/modals/credits/ThankYouPaymentModal";
import LogoutModal from "../../components/modals/LogoutModal";
import ChangePasswordModal from "../../components/modals/admin/profile/ChangePasswordModal";
import DeactivateUserModal from "../../components/modals/admin/user/DeactivateUserModal";
import PackageFormModal from "../../components/modals/admin/packages/PackageFormModal";
import ContactUsModal from "../../components/modals/ContactUsModal";
import PaymentFailed from "../../components/modals/credits/PaymentFailed";
import PrivacyPolicyModal from "../../components/modals/admin/systemsettings/PrivacyPolicy";
import TermsAndConditionsModal from "../../components/modals/admin/systemsettings/TermsAndConditions";
import DeletePackageModal from "../../components/modals/admin/packages/DeletePackageModal";
import ActivateUserModal from "../../components/modals/admin/user/ActivateUserModal";
import ContactRequestInfoModal from "../../components/modals/admin/ContactRequest";
import ComingSoonModal from "../../components/modals/ComingSoon";

export const MODAL_REGISTRY = {
  LOGIN: LoginForm,
  SIGNUP: SignupForm,
  FORGOT_PASSWORD: ForgotPasswordForm,
  RESET_PASSWORD: ResetPasswordForm,
  CHECK_EMAIL_FOR_PASSWORD_RESET: CheckEmailForPasswordReset,
  CHECK_EMAIL_FOR_VERIFICATION: CheckEmailForVerify,
  PASSWORD_UPDATED: PasswordUpdated,
  VERIFY_EMAIL: VerifyEmailModal,
  UPDATE_EMAIL_CONFIRMATION: EmailOTPVerification,
  ENTER_NEW_MAIL: EnterNewEmail,
  ENTER_MAIL_FOR_RESEND_LINK: EnterMailForResendLink,
  NEW_EMAIL_VERIFICATION: NewEmailOtpVerification,
  EMAIL_UPDATED: EmailUpdated,
  BUY_CREDITS: BuyCreditsModal,
  PAYMENT_SUCCESS: ThankYouPaymentModal,
  PAYMENT_CANCEL: PaymentFailed,
  LOGOUT: LogoutModal,
  CHANGE_PASSWORD: ChangePasswordModal,
  DEACTIVATE_USER: DeactivateUserModal,
  ACTIVATE_USER: ActivateUserModal,
  PACKAGE_FORM: PackageFormModal,
  PACKAGE_DELETE: DeletePackageModal,
  CONTACT_US: ContactUsModal,
  CONTACT_REQUEST_INFO: ContactRequestInfoModal,
  PRIVACY_POLICY: PrivacyPolicyModal,
  TERMS_AND_CONDITIONS: TermsAndConditionsModal,
  COMING_SOON: ComingSoonModal,
};

export type ModalType = keyof typeof MODAL_REGISTRY;

export const MODAL_TYPES = Object.fromEntries(
  Object.keys(MODAL_REGISTRY).map((key) => [key, key]),
) as { [K in ModalType]: K };
