import type { ChangeEventHandler } from "react";

/** Core email fields stored via Settings API (`/settings`). */
export type EmailSettingsValues = {
  admin_email: string;
  from_email: string;
  from_name: string;
  email_template_booking: boolean;
  email_template_confirmation: boolean;
  email_template_cancellation: boolean;
  email_template_reminder: boolean;
  email_template_admin_new_booking: boolean;
  email_template_admin_payment: boolean;
  email_template_admin_cancellation: boolean;
  email_template_trip_consent: boolean;
  email_template_customer_verification: boolean;
  email_template_booking_completed: boolean;
  email_template_booking_expired_customer: boolean;
  email_template_admin_booking_expired: boolean;
  email_template_scheduled_payment_reminder: boolean;
  email_template_scheduled_payment_succeeded: boolean;
  email_template_scheduled_payment_failed: boolean;
  email_template_admin_scheduled_payment_failed: boolean;
  email_template_enquiry_received: boolean;
  email_template_enquiry_admin: boolean;
  email_template_enquiry_response: boolean;
  email_template_review_request: boolean;
  email_template_abandoned_booking_recovery: boolean;
  smtp_enabled: boolean;
  smtp_host: string;
  smtp_port: number;
  smtp_username: string;
  smtp_password: string;
  smtp_encryption: string;
  email_tpl_booking_subject: string;
  email_tpl_booking_body: string;
  email_tpl_payment_subject: string;
  email_tpl_payment_body: string;
  email_tpl_cancellation_subject: string;
  email_tpl_cancellation_body: string;
  email_tpl_reminder_subject: string;
  email_tpl_reminder_body: string;
  email_tpl_admin_booking_subject: string;
  email_tpl_admin_booking_body: string;
  email_tpl_admin_payment_subject: string;
  email_tpl_admin_payment_body: string;
  email_tpl_admin_cancellation_subject: string;
  email_tpl_admin_cancellation_body: string;
  email_tpl_trip_consent_subject: string;
  email_tpl_trip_consent_body: string;
  email_tpl_customer_verification_subject: string;
  email_tpl_customer_verification_body: string;
  email_tpl_booking_completed_subject: string;
  email_tpl_booking_completed_body: string;
  email_tpl_booking_expired_customer_subject: string;
  email_tpl_booking_expired_customer_body: string;
  email_tpl_admin_booking_expired_subject: string;
  email_tpl_admin_booking_expired_body: string;
  email_tpl_scheduled_payment_reminder_subject: string;
  email_tpl_scheduled_payment_reminder_body: string;
  email_tpl_scheduled_payment_succeeded_subject: string;
  email_tpl_scheduled_payment_succeeded_body: string;
  email_tpl_scheduled_payment_failed_subject: string;
  email_tpl_scheduled_payment_failed_body: string;
  email_tpl_admin_scheduled_payment_failed_subject: string;
  email_tpl_admin_scheduled_payment_failed_body: string;
  email_tpl_enquiry_received_subject: string;
  email_tpl_enquiry_received_body: string;
  email_tpl_enquiry_admin_subject: string;
  email_tpl_enquiry_admin_body: string;
  email_tpl_enquiry_response_subject: string;
  email_tpl_enquiry_response_body: string;
  email_tpl_review_request_subject: string;
  email_tpl_review_request_body: string;
  email_tpl_abandoned_booking_recovery_subject: string;
  email_tpl_abandoned_booking_recovery_body: string;
};

export type EmailFieldChangeHandler = ChangeEventHandler<
  HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement
>;
