import { Store } from 'amos-tool';

const lsTool = Store.lsTool;

export const cacheConsts = {
  _days: 1,
  CURRENT_REGION: 'CURRENT_REGION'
};

export const setRegion = data => {
  lsTool.write(cacheConsts.CURRENT_REGION, JSON.stringify(data));
};

export const getRegion = () => {
  return lsTool.read(cacheConsts.CURRENT_REGION);
};
