import { getValue } from '@/helpers/variable-handling'

export default {
  getCardList: state => state.cardList,
  getShippingCycleDetail: state => state.autoshipShippingCycle,
  getPaymentInfo: state => state.autoshipPaymentInfo,
  getAutoshipShippingInfo: state => state.autoshipShippingInfo,
  getAutoshipBillingInfo: state => state.autoshipBillingInfo,
  getAutoshipSubscriptionList: state => state.subscriptionList,
  getAutoshipSubscriptionPaginationMeta: state => state.subscriptionListPaginationMeta,
  getAutoshipSubscriptionDetail: state => state.subscriptionDetail,
  getAutoshipSearchFilter: state => state.autoshipSearchFilter,
  getAutoshipSuccessMessage: state => getValue(state, 'autoshipData.success', '-N/A-'),
  getIsAutoshipCreationSuccess: state => getValue(state, 'autoshipData') !== false,
}
