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

import constants from './constants';

const actions = {
  load: createAsyncStructure(`${constants.prefix}_event_load`),
  loadOne: createAsyncStructure(`${constants.prefix}_event_load_one`),
  add: createAsyncStructure(`${constants.prefix}_event_add`),
  edit: createAsyncStructure(`${constants.prefix}_event_edit`),
  delete: createAsyncStructure(`${constants.prefix}_event_delete`),
  search: createAsyncStructure(`${constants.prefix}_event_search`),
  participant: {
    load: createAsyncStructure(`${constants.prefix}_event_participant_load`),
    add: createAsyncStructure(`${constants.prefix}_event_participant_add`),
    remove: createAsyncStructure(`${constants.prefix}_event_participant_remove`),
    export: createAsyncStructure(`${constants.prefix}_event_participant_export`),
    exportPDF: createAsyncStructure(`${constants.prefix}_event_participant_export_pdf`),
    exportAttestationPDF: createAsyncStructure(
      `${constants.prefix}_event_participant_export_attestation_pdf`,
    ),
    markAsParticipate: createAsyncStructure(
      `${constants.prefix}_event_participant_mark_as_participate`,
    ),
    cancelParticipation: createAsyncStructure(
      `${constants.prefix}_event_participant_cancel_participation`,
    ),
    sendAttestation: createAsyncStructure(`${constants.prefix}_event_participant_send_attestation`),
  },
  event: {
    publish: createAsyncStructure(`${constants.prefix}_event_publish`),
    unpublish: createAsyncStructure(`${constants.prefix}_event_unpublish`),
  },
};

export default actions;
