"use client"; import { useState } from "react"; import Link from "next/link"; import type { CartGroup } from "@/types/api"; /** * "دریافت حضوری" vs "ارسال توسط فروشگاه" has no backing field in the Checkout API — * the OpenAPI spec's Checkout schema is address_uuid/delivery_type/scheduled_at/ * payment_method/notes only, with delivery_type meaning express-vs-scheduled timing, * not pickup-vs-delivery fulfillment. So this toggle only affects what's *displayed* * here; the actual order submission (next screen) still uses the real delivery fee. */ export function CheckoutFulfillment({ group }: { group: CartGroup }) { const [pickup, setPickup] = useState(false); const deliveryFee = pickup ? 0 : group.delivery_fee; const payable = group.items_subtotal + deliveryFee; return (