/* eslint-disable @typescript-eslint/camelcase */
import { addressModel, strictAddressModel, settingModel } from 'store/appModels';

const billingAddressModel = {
  firstName: true,
  lastName: true,
  address: strictAddressModel,
  email: true,
  default: true,
  customTags: true,
  company: true,
  vatNumber: true,
  fiscalForm: true,
  _id: true,
};

const paymentMethodDetail = {
  _id: true,
  sPayMethodId: true,
  default: true,
  nameOnCard: true,
  type: true,
  cardInfo: {
    brand: true,
    country: true,
    exp_month: true,
    exp_year: true,
    last4: true,
  },
};

const favoriteModel = {
  ressourceId: true,
  ressourceType: true,
  addedAt: true,
  favorite: true,
};

const accountModel = {
  _id: true,
  email: true,
  firstName: true,
  language: true,
  lastName: true,
  gender: true,
  phoneNumber: true,
  birthDate: true,
  types: true,
  address: addressModel,
  paymentInfo: {
    stripeInfo: {
      customerId: true,
    },
    paymentMethods: {
      sPayMethodId: true,
      nameOnCard: true,
      default: true,
      _id: true,
      type: true,
      cardInfo: {
        brand: true,
        country: true,
        exp_month: true,
        exp_year: true,
        last4: true,
      },
    },
    billingInfos: billingAddressModel,
  },
  payoutInfo: {
    stripeInfo: {
      accountId: true,
      chargesEnabled: true,
      payoutsEnabled: true,
      detailsSubmitted: true,
    },
  },
  getFavorites: favoriteModel,
  createdAt: true,
  updatedAt: true,
  settings: settingModel,
};

export { accountModel, billingAddressModel, paymentMethodDetail, favoriteModel };

export default accountModel;
