/**
 * 文件职责：费用设置页面类型定义。
 * 1. 声明页面表单态与快照类型。
 * 2. 声明阶梯抽屉模式与表单类型。
 */
import type {
  OrderPackagingFeeMode,
  PackagingFeeMode,
  PackagingFeeTierDto,
  StoreOtherFeesDto,
} from '#/api/store-fees';

export type FeesTierDrawerMode = 'create' | 'edit';

export interface PackagingFeeTierFormState {
  fee: number;
  id: string;
  maxAmount: null | number;
  minAmount: number;
}

export interface StoreFeesFormState {
  baseDeliveryFee: number;
  platformServiceRate: number;
  fixedPackagingFee: number;
  freeDeliveryThreshold: null | number;
  minimumOrderAmount: number;
  orderPackagingFeeMode: OrderPackagingFeeMode;
  otherFees: StoreOtherFeesDto;
  packagingFeeMode: PackagingFeeMode;
  packagingFeeTiers: PackagingFeeTierDto[];
}

export type StoreFeesSettingsSnapshot = StoreFeesFormState;
