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

import constants from './constants';

const actions = {
  load: createAsyncStructure(`${constants.prefix}_settings_load`),
  loadOne: createAsyncStructure(`${constants.prefix}_settings_load_one`),
  add: createAsyncStructure(`${constants.prefix}_settings_add`),
  edit: createAsyncStructure(`${constants.prefix}_settings_edit`),
  delete: createAsyncStructure(`${constants.prefix}_settings_delete`),
  search: createAsyncStructure(`${constants.prefix}_settings_search`),
  // Other
  acFieldInfo: createAsyncStructure(`${constants.prefix}_settings_ac_field_info`),
  // Project Settings
  getProjectSettings: createAsyncStructure(`${constants.prefix}_get_project_settings`),
  addProjectSettings: createAsyncStructure(`${constants.prefix}_add_project_settings`),
  editProjectSettings: createAsyncStructure(`${constants.prefix}_edit_project_settings`),
  integrations: {
    instagram: {
      crawl: createAsyncStructure(`${constants.prefix}_integrations_insta_crawl`),
      post: createAsyncStructure(`${constants.prefix}_integrations_insta_post`),
      generate: createAsyncStructure(`${constants.prefix}_integrations_insta_get_token`),
    },
  },
};

export default actions;
