import { GetterTree, mapGetters } from 'vuex';
import { CardComponentsState } from '@/types/store/scopes';

export const state: CardComponentsState = {
  components: [
    'index',
    'author',
    'basic',
    'data',
    'old_meta',
    'documents',
    'documents_resolution',
    'info',
    'cross',
    'checks',
    'history',
    'packages',
    'payments',
    'statements',
    'charges',
    'payments_search',
    'sdd',
    'system',
  ].join(','),
};

export const getters: GetterTree<CardComponentsState, CardComponentsState> = {
  components: (state) => state.components,
};

export const cardComponentsStatementsComputed = {
  ...mapGetters('cardComponents/statements', ['components']),
};
