import { createTypes, createAsyncTypes } from '../utils/create-types';

export const ns = 'app';

export const actionTypes = createTypes(
  [
    'setTheme',
    'initializeTheme',
    'toggleTheme',
    'appMount',
    'hardGoTo',
    'allowSectionDonationRequests',
    'setRenderStartTime',
    'preventSectionDonationRequests',
    'setIsRandomCompletionThreshold',
    'openDonationModal',
    'closeDonationModal',
    'openSignoutModal',
    'closeSignoutModal',
    'onlineStatusChange',
    'serverStatusChange',
    'resetUserData',
    'routeUpdated',
    'tryToShowDonationModal',
    'startExam',
    'stopExam',
    'clearExamResults',
    'linkMsUsername',
    'unlinkMsUsername',
    'setMsUsername',
    'setIsProcessing',
    'submitComplete',
    'submitSurvey',
    'submitSurveyComplete',
    'updateComplete',
    'updateFailed',
    'updateDonationFormState',
    'updateUserToken',
    'postChargeProcessing',
    'updateCardRedirecting',
    ...createAsyncTypes('updateCard'),
    ...createAsyncTypes('fetchUser'),
    ...createAsyncTypes('postCharge'),
    ...createAsyncTypes('fetchProfileForUser'),
    ...createAsyncTypes('showCert'),
    ...createAsyncTypes('reportUser'),
    ...createAsyncTypes('deleteUserToken'),
    ...createAsyncTypes('saveChallenge'),
    'fetchUserTimeout'
  ],
  ns
);
