import { IProductModel } from '../../billing/model/product.model';
import { IBaseFleioObjectModel } from '../../base-model/base-fleio-object.model';
import { ICurrencyModel } from '@fleio-api/billing/model/currency.model';

export interface IConfigurationBillingModel extends IBaseFleioObjectModel {
  require_credit_card: boolean;
  signup_charge_amount: number;
  signup_charge_amount_action: string;
  credit_limit: number;
  credit_required: number;
  auto_unsuspend_client_on_credit_update: boolean;
  credit_limit_with_agreement: number;
  credit_required_with_agreement: number;
  auto_suspend: boolean;
  auto_suspend_delay_hours_enabled: boolean;
  auto_suspend_delay_hours: number;
  auto_suspend_delay_credit_enabled: boolean;
  auto_suspend_delay_credit: number;
  auto_suspend_notification_template: any;
  auto_terminate: boolean;
  auto_terminate_delay_hours: number;
  suspend_instead_of_terminate: boolean;
  auto_terminate_notification_template: any;
  credit_notifications_enabled: boolean;
  credit_notifications_when_agreement_enabled: boolean;
  first_credit_remaining_hours: number;
  first_credit_notification_template: any;
  second_credit_remaining_hours: number;
  second_credit_notification_template: any;
  third_credit_remaining_hours: number;
  third_credit_notification_template: any;
  // Invoice notifications
  invoice_notifications_enabled: boolean;
  first_invoice_payment_reminder_remaining_hours: number;
  first_invoice_payment_reminder_notification_template: string;
  second_invoice_payment_reminder_remaining_hours: number;
  second_invoice_payment_reminder_notification_template: string;
  first_invoice_payment_overdue_hours: number;
  first_invoice_payment_overdue_notification_template: string;
  second_invoice_payment_overdue_hours: number;
  second_invoice_payment_overdue_notification_template: string;
  third_invoice_payment_overdue_hours: number;
  third_invoice_payment_overdue_notification_template: string;
  invoice_payment_confirmation_notification_template: string;
  invoice_refund_confirmation_notification_template: string;

  // Service notifications
  service_notifications_enabled: boolean;
  service_suspended_notification_template: string;
  service_resumed_notification_template: string;

  // Order settings
  order_grace_days: number;

  // MaxMind fraud check
  fraud_check: boolean;
  enable_maxmind_insights: boolean;
  maxmind_fraud_score: number;
  skip_fraud_check_for_active_clients: boolean;
  automatically_mark_new_orders_as_fraud_for_clients_with_fraud_order: boolean;

  sender_email: string;
  sender_name: string;
  company_info: string;
  auto_eu_tax_exemption: boolean;
  generate_invoices: boolean;
  generate_invoices_after_dt: string;
  create_todo_on_invoice_payment: boolean;
  send_notifications_for_unpaid_invoices: boolean;
  auto_settle_usage: boolean;
  allow_multiple_add_credit_invoices: boolean;
  auto_pay_invoice_only_when_enough_credit: boolean;
  next_paid_invoice_number: number;
  next_paid_invoice_number_format: string;
  minim_uptodate_credit_for_invoice_payment: number;
  invoicing_option: string;
  limit_billable_seconds_per_month: boolean;
  billable_seconds_per_month: number;
  issue_invoice_before_next_due_date: boolean;
  next_invoice_date_offset: number;
  billing_cycle_as_calendar_month: boolean;
  auto_create_order: boolean;
  auto_order_service: boolean;
  auto_order_service_cycle: number;
  auto_order_service_params: any;
  client_initial_credit: number;
  credit_message_templates: Array<Array<string>>;
  billing_message_templates: Array<Array<string>>;
  service_message_templates: Array<Array<string>>;
  products: IProductModel[];
  countries: [string, string][];

  default_currency: ICurrencyModel;
}
