import {
  PROFILE_CLEAR,
  PROFILE_ERROR,
  PROFILE_FETCH,
  PROFILE_MINE_FETCH,
  PROFILE_MINE_SET,
  PROFILE_SET,
  PROFILE_SUCCESS,
  PROFILE_EDIT,
  PROFILE_MINE_FETCH_SUCCESS,
  PROFILE_EDIT_SUCCESS,
  PROFILE_MINE_FETCH_ERROR,
  PROFILE_EDIT_ERROR,
} from "./profileActionConstants";

export const fetchProfile = (payload) => ({
  type: PROFILE_FETCH,
  payload,
});
export const fetchProfileSuccess = (payload) => ({
  type: PROFILE_SUCCESS,
  payload,
});
export const fetchErrorProfile = (payload) => ({
  type: PROFILE_ERROR,
  payload,
});

export const fetchMineProfile = () => ({
  type: PROFILE_MINE_FETCH,
});
export const fetchMineProfileSuccess = () => ({
  type: PROFILE_MINE_FETCH_SUCCESS,
});
export const fetcHMineProfileError = () => ({
  type: PROFILE_MINE_FETCH_ERROR,
});

export const editMineProfile = (payload) => ({
  type: PROFILE_EDIT,
  payload,
});
export const editMineProfileSuccess = () => ({
  type: PROFILE_EDIT_SUCCESS,
});
export const editMineProfileError = () => ({
  type: PROFILE_EDIT_ERROR,
});

export const clearProfile = () => ({
  type: PROFILE_CLEAR,
});
export const setProfile = (payload) => ({
  type: PROFILE_SET,
  payload,
});
export const setMineProfile = (payload) => ({
  type: PROFILE_MINE_SET,
  payload,
});
