/**
 * 文件职责：自提设置页面静态常量。
 * 1. 维护默认值、模式选项、星期枚举。
 * 2. 维护精细规则可选间隔等静态配置。
 */
import type {
  PickupBasicSettingsDto,
  PickupFineRuleDto,
  PickupMode,
  PickupWeekDay,
} from '#/api/store-pickup';
import type { PickupWeekDayOption } from '#/views/store/pickup/types';

export const PICKUP_MODE_OPTIONS: Array<{ label: string; value: PickupMode }> =
  [
    { label: '大时段模式', value: 'big' },
    { label: '精细时段模式', value: 'fine' },
  ];

export const DEFAULT_PICKUP_MODE: PickupMode = 'big';

export const WEEKDAY_OPTIONS: PickupWeekDayOption[] = [
  { label: '周一', value: 0 },
  { label: '周二', value: 1 },
  { label: '周三', value: 2 },
  { label: '周四', value: 3 },
  { label: '周五', value: 4 },
  { label: '周六', value: 5 },
  { label: '周日', value: 6 },
];

export const ALL_WEEK_DAYS: PickupWeekDay[] = [0, 1, 2, 3, 4, 5, 6];
export const WEEKDAY_ONLY: PickupWeekDay[] = [0, 1, 2, 3, 4];
export const WEEKEND_ONLY: PickupWeekDay[] = [5, 6];

export const FINE_INTERVAL_OPTIONS: Array<{ label: string; value: number }> = [
  { label: '15 分钟', value: 15 },
  { label: '20 分钟', value: 20 },
  { label: '25 分钟', value: 25 },
  { label: '30 分钟', value: 30 },
  { label: '45 分钟', value: 45 },
  { label: '60 分钟', value: 60 },
];

export const DEFAULT_PICKUP_BASIC_SETTINGS: PickupBasicSettingsDto = {
  allowSameDayPickup: false,
  bookingDays: 1,
  maxItemsPerOrder: null,
};

export const DEFAULT_FINE_RULE: PickupFineRuleDto = {
  intervalMinutes: 30,
  slotCapacity: 1,
  dayStartTime: '',
  dayEndTime: '',
  minAdvanceHours: 0,
  dayOfWeeks: [],
};
