import { locales } from '@pisell/utils';
export var defaultData = {
  isOpenGroup: true,
  carts: [],
  platform: 'shop',
  emptyText: locales.getText('pisell2.text.no.selected'),
  activeKey: [],
  defaultActiveKey: [],
  className: ''
};

/**
 * @title: 根据是否是跨日预约和是否是terminal打开的，返回日期和输入框占据的列数
 * @description: 
 * @param {boolean} isDayBooking
 * @param {boolean} isTerminal
 * @return {*}
 * @Author: WangHan
 * @Date: 2024-12-06 10:29
 */
export var inputDateCol = function inputDateCol(isDayBooking, isTerminal) {
  var params = {
    date: {},
    input: {}
  };

  // 不是跨日预约，只有输入框占据一行
  if (!isDayBooking) {
    params.input = {
      span: 24
    };
    return params;
  }

  // 如果是terminal打开的需要根据不同的屏幕宽度调整
  if (isTerminal) {
    params.date = {
      sm: 24,
      lg: 24,
      xl: 12
    };
    params.input = {
      sm: 24,
      lg: 24,
      xl: 12
    };
  } else {
    params.date = {
      span: 12
    };
    params.input = {
      span: 12
    };
  }
  return params;
};

/**
 * @title:  预约商品扩展类型
 * @description: 
 * @return {*}
 * @Author: WangHan
 * @Date: 2024-12-06 14:59
 */
export var appointmentTypes = ['product_appointment'];

/**
 * @title: 营业日时间
 * @description: 
 * @return {*}
 * @Author: WangHan
 * @Date: 2024-12-06 17:23
 */
export var openingTime = function openingTime() {
  // 营业日时间
  var openingTime = localStorage.getItem('shopOpeningHours');
  return openingTime || '00:00';
};