import type { OrderStatus } from '@/shared/constants/order'

type OrderPriceApprovalCandidate = {
  status: OrderStatus
  deliveryType: 'delivery' | 'pickup'
  deliveryFeeLocked: boolean
}

export function orderRequiresPriceApproval(order: OrderPriceApprovalCandidate): boolean {
  return order.status === 'PENDING_PAYMENT' && order.deliveryType === 'delivery' && order.deliveryFeeLocked === false
}
