export interface AccountOwner {
  AccountID: string;
  ContactID: number;
  Title: string | null;
  TitleID: number;
  FirstName: string;
  LastName: string;
  MailName: string;
  Salutation: string | null;
  Email: string;
  Phone: string | null;
  Fax: string | null;
  Mobile: string | null;
  AddressLine1: string | null;
  AddressLine2: string | null;
  AddressState: string | null;
  AddressCity: string | null;
  AddrCountry: string | null;
  Postcode: string | null;
  Nationality: string | null;
  DateOfBirth: string;
  IsPrimary: boolean;
  IsOwner: boolean;
  IsFamily: boolean;
  IsAuthority: boolean;
  Active: boolean;
  CRMData: CRMDataItem[];
  Deleted: boolean;
}

export interface AccountContact {
  AccountID: string;
  ContactID: number;
  Title: string | null;
  TitleID: number;
  FirstName: string;
  LastName: string;
  MailName: string;
  Salutation: string | null;
  Email: string;
  Phone: string | null;
  Fax: string | null;
  Mobile: string | null;
  AddressLine1: string | null;
  AddressLine2: string | null;
  AddressState: string | null;
  AddressCity: string | null;
  AddrCountry: string | null;
  Postcode: string | null;
  Nationality: string | null;
  DateOfBirth: string;
  IsPrimary: boolean;
  IsOwner: boolean;
  IsFamily: boolean;
  IsAuthority: boolean;
  Active: boolean;
  CRMData: CRMDataItem[];
  Deleted: boolean;
}
export interface CRMDataItem {
  DataID: number;
  FieldID: number;
  Value: number;
}
export interface MemeberAccount {
  AccountID: string;
  AccountName: string;
  AccountType: string;
  AccountTypeID: number;
  ServiceCenter: string;
  ServiceCenterID: number;
  AccountStatus: string;
  AccountStatusID: number;
  DefaultChargeCenter: number;
  JoinedDate: string | null;
  BillingAddressLine1: string | null;
  BillingAddressLine2: string | null;
  BillingAddressState: string | null;
  BillingAddressCity: string | null;
  BillingAddrCountry: string | null;
  BillingPostcode: string | null;
  Notes: string;
  Owners: AccountOwner[];
  Contacts: AccountContact[];
  Deleted: boolean;
  ModifyDate: string | null;
  CRMData?: {
    DataID: number;
    FieldID: number;
    Value: number;
    FieldName: string;
    ValueName: string;
  }[];
}

export interface ResortBookingRef {
  resort_code: string;
  contact_id: string;
  arrival: string;
  departure: string;
  travelling: string;
  first_name: string;
  last_name: string;
  telephone: string;
  country: string;
  state: string;
  postcode: string;
  city: string;
  address_line_1: string;
  address_line_2: string;
  nationality: string;
  email: string;
  alternate_confirmation_mail: string;
  adults: number;
  children: number;
  children_ages: number[];
  comment: string;
  record_hash: string;
}

export interface HoldResortBooking {
  hold_id: number;
  hold_expiration: string;
  total_charge: number;
  total_gst_fee: number;
  total_credit_card_fee: number;
  total_charge_currency: string;
  total_charge_notes: string;
  form_data: ResortBookingRef & {
    units: {
      STUDIO: {
        unit_code: "STUDIO";
        qty: 1;
        unit_name: "Studio Apartment";
      };
    };
    resort_name: "Mentari Residences";
  };
  slug: "mentari-residences";
}

export interface CompleteBooking extends ResortBookingRef {
  units: {
    unit_code: string;
    qty: number;
  }[];
  BookingID: number;
  Bookings: {
    ResortID: number;
    ResortCode: string;
    ResortName: string;
    ResortType: string;
    ResortAddress: {
      AddressLine1: string;
      AddressLine2: string | null;
      AddressLine3: string;
      AddressCity: string;
      AddrCountry: string;
      Postcode: string;
    };
    BookingNo: number;
    Status: string;
    Arrival: string;
    ActualArrival: string;
    Departure: string;
    GuestName: string;
    Adults: number;
    Children: number;
    Infants: number;
    Cots: number;
    HighChair: number;
    Room: string | null;
    RoomDescription: string;
    RoomType: string;
    RoomTypeCode: string;
    RoomCategory: string;
    RoomCategoryCode: string;
    AccountID: string;
    AccountType: string;
    BookingSource: string;
    BookingSourceCode: string;
    BookingComment: string | null;
    BookingType: string;
    BookingTypeID: number;
    ModifyDateTime: string;
    Owner: AccountContact | null;
    PrimaryGuest: AccountContact;
    Guests: AccountContact[];
    qty: number;
    resort_code: string;
  }[];
}

export interface HoldExperienceBooking {
  hold_id: number;
  hold_expiration: string;
  total_charge: number;
  total_gst_fee: number;
  total_credit_card_fee: number;
  total_charge_currency: string;
  total_charge_notes: string;
  form_data: {
    event_code: string;
    event_name: string;
    event_start_date: string;
    event_end_date: string;
    is_accommodation_required: boolean;
    attendees: {
      contact_id: string;
      first_name: string;
      last_name: string;
      email: string;
      date_of_birth: string;
      nationality: string;
    }[];
  };
}

export interface CompleteExperienceBooking {
  BookingNo: number;
  BookingTypeID: number;
  event_code: string;
  event_name: string;
  event_location: string;
  qty: number;
  City: string;
  Country: string;
  Arrival: string;
  Departure: string;
  Adults: number;
  Children: number;
  Infants: number;
  Cots: number;
  HighChair: number;
}

export interface CuratedExperienceBookingOptions {
  event_code: string;
  event_name: string;
  event_location: string;
  City: string;
  Country: string;
  booking_options: {
    normal: BookingOption[];
  };
}

export interface BookingOption {
  type: string;
  currency: string;
  currency_pos: string;
  price: number;
  add_cost: number;
  add_cost_currency: string;
  add_cost_currency_pos: string;
  memberTravelling: boolean;
  guestTravelling: boolean;
  guest_certificate_fee: number;
  guest_certificate_fee_currency: string;
  guest_certificate_fee_currency_pos: string;
  notes: string[];
  terms_conditions: string[];
  record_hash: string;
}

export interface ManagementCharge {
  ID: number;
  ChargeDate: string;
  AccountID: string;
  ResortID: number;
  ResortName: string;
  Code: string;
  PackageCode: string | null;
  Currency: string;
  Amount: number;
  Tax: number;
  Total: number;
  DiscountedAmount: number;
  DiscountedTax: number;
  DiscountedTotal: number;
  DiscountExpires: string | null;
  Balance: number;
  Comment: string;
  LevyYear: number;
  DueDate: string;
  ContractID: number;
  BankID: number;
  BookingNo: number;
}
