
import * as types from './constants';

export function defaultAction() {
  return {
    type: types.DEFAULT_ACTION,
  };
}

export const uploadViberAsset = (file, assetType, fileParams, templateType) => ({
  type: types.UPLOAD_VIBER_ASSET_REQUEST,
  file,
  assetType,
  fileParams,
  templateType,
});


export function createTemplate(template, callback) {
  return {
    type: types.CREATE_VIBER_TEMPLATE_REQUEST,
    template,
    callback,
  };
}


// FOR EDIT

export function editTemplate(template, callback) {
  
  return {
    type: types.EDIT_VIBER_TEMPLATE_REQUEST,
    template,
    callback,
  };
}

export function getTemplateDetails(id, callback) {
  
  return {
    type: types.GET_VIBER_TEMPLATE_DETAILS_REQUEST,
    id,
    channel: 'VIBER',
    callback,
  };
}

export function clearData() {
  return {
    type: types.CLEAR_VIBER_DATA,
  };
}

export function clearEditResponse() {
  return {
    type: types.CLEAR_VIBER_EDIT_RESPONSE_REQUEST,
  };
}


export function clearCreateResponse() {
  return {
    type: types.CLEAR_VIBER_CREATE_RESPONSE_REQUEST,
  };
}

export function clearViberAsset(templateType) {
  return {
    type: types.CLEAR_VIBER_ASSET,
    templateType,
  };
}

