# snt-checkout

# Component Pages

# Props

ไม่มี Props

# Slots

# Default

{ 
  selectedPurchase: Purchase[] // Item ที่ลูกค้าเลือกมา Checkout
  totalQuantity: number // จำนวนของ selectedPurchase
  totalPrice: number // ราคารวมของ selectedPurchase
  shippingFee: number // ค่าส่งที่ระบบคำนวณ ของขนส่งที่เลือก
  promoCodeDiscount: number // ส่วนลดจากโค้ดส่วนลดที่เลือก
  netPrice: number // totalPrice + shippingFee - promoCodeDiscount
  errors: Array<string> // errors เช่น address ที่อยู่ไม่สมบูรณ์
  valid: boolean // สามารถกดปุ่ม submit ได้
  submitting: boolean // สถานะกำลัง Submit สำหรับแสดง loading ของปุ่ม submit
  submit: () => void // สำหรับปุ่ม Checkout
}

# items

{
  items: Purchase[],
  totalPrice: number
}

# promoCodes

ไม่มี Props

# shipping

ไม่มี Props

# address

ไม่มี Props

# paymentMethods

ไม่มี Props

# action

{
  selectedPurchase: Purchase[],
  netPrice: number,
  valid: boolean,
  submitting: boolean,
  on: {
    submit: () => void
  }
}