import { DynamincType, FastTypeKeys } from "./constant";
import dayjs from 'dayjs';
export var getDurationOfFastType = function getDurationOfFastType(fast, val, type, unit, fastMap) {
  if (!fast) return [null, null];

  if (fast === FastTypeKeys.customer) {
    if (type === DynamincType.after) {
      return [dayjs(), dayjs().add(val || 0, unit)];
    }

    return [dayjs().subtract(val || 0, unit), dayjs()];
  }

  return fastMap[fast];
};

