import { types } from "../actions/actionTypes";

const initialState = {
  brandInfoData: {},
  brandLayoutInfoData: {},
  brandLiveChannelInfoData: {},
  brandTsvInfoData: {},
};

export const brandReducer = (state = initialState, action) => {
  switch (action.type) {
    case types.GET_BRAND_LIST:
      return {
        ...state,
        brandInfoData: action.payload,
      };

    case types.GET_BRAND_LAYOUT_INFO:
      return {
        ...state,
        brandLayoutInfoData: action.payload,
      };

    case types.GET_BRAND_LIVE_CHANNEL_INFO:
      return {
        ...state,
        brandLiveChannelInfoData: action.payload,
      };

    case types.GET_BRAND_TODAYS_DEALS:
      return {
        ...state,
        brandTsvInfoData: action.payload,
      };

    default:
      return state;
  }
};
