/**
 * 文件职责：配送设置页面常量。
 * 1. 定义默认配送模式与默认数据。
 * 2. 统一维护颜色、选项等静态配置。
 */
import type {
  DeliveryGeneralSettingsDto,
  DeliveryMode,
  PolygonZoneDto,
  RadiusTierDto,
} from '#/api/store-delivery';

export const DELIVERY_MODE_OPTIONS: Array<{
  label: string;
  value: DeliveryMode;
}> = [
  { label: '按半径配送', value: 'radius' },
  { label: '按区域配送（多边形）', value: 'polygon' },
];

export const TIER_COLOR_PALETTE = [
  '#52c41a',
  '#faad14',
  '#ff4d4f',
  '#1677ff',
  '#13c2c2',
];

export const DEFAULT_DELIVERY_MODE: DeliveryMode = 'radius';

export const DEFAULT_RADIUS_TIERS: RadiusTierDto[] = [];

export const DEFAULT_POLYGON_ZONES: PolygonZoneDto[] = [];

export const DEFAULT_GENERAL_SETTINGS: DeliveryGeneralSettingsDto = {
  freeDeliveryThreshold: null,
  maxDeliveryDistance: 0,
  hourlyCapacityLimit: 1,
  etaAdjustmentMinutes: 0,
};
