import { createActionStructure, createAsyncStructure } from 'store/utils/actions';

import constants from './constants';

const actions = {
  profile: createAsyncStructure(`${constants.prefix}_profile`),
  afterLogin: createActionStructure(`${constants.prefix}_after_login`),
  afterSignup: createActionStructure(`${constants.prefix}_after_signup`),

  updateProfile: createAsyncStructure(`${constants.prefix}_update_profile`),
  register: createAsyncStructure(`${constants.prefix}_register`),

  addBillingInfos: createAsyncStructure(`${constants.prefix}_add_billing_info`),
  updateBillingInfos: createAsyncStructure(`${constants.prefix}_edit_billing_info`),
  deleteBillingInfos: createAsyncStructure(`${constants.prefix}_delete_billing_info`),
  addPaymentMethod: createAsyncStructure(`${constants.prefix}_add_payment_method`),
  deletePaymentMethod: createAsyncStructure(`${constants.prefix}_delete_payment_method`),
  updateDefaultPaymentMethod: createAsyncStructure(`${constants.prefix}_update_default_payment`),

  changeEmail: createAsyncStructure(`${constants.prefix}_change_email`),
  changePassword: createAsyncStructure(`${constants.prefix}_change_password`),

  addFavoriteToAccount: createAsyncStructure(`${constants.prefix}_add_favorite`),
  removeFavoriteToAccount: createAsyncStructure(`${constants.prefix}_remove_favorite`),
  stripeLink: createAsyncStructure(`${constants.prefix}_stripe_link`),
  stripeRefresh: createAsyncStructure(`${constants.prefix}_stripe_refresh`),
  stripeDashboardLink: createAsyncStructure(`${constants.prefix}_stripe_dashboard_link`),

  saveRedirect: createActionStructure('accountSaveRedirect'),
};

export default actions;
