import { gql,TypedDocumentNode } from "@apollo/client";
import { CreatePaymentCallbackData } from "@/types/checkout/type";

export const CREATE_PAYMENT_CALLBACK: TypedDocumentNode<CreatePaymentCallbackData> = gql`
  mutation CreatePaymentCallback(
      $orderId: Int
      $gatewayOrderId: String
      $status: String
      $paymentSignature: String
      $verifyToken: String
      
      $shippingFirstName: String
      $shippingLastName: String
      $shippingEmail: String
      $shippingAddress: String
      $shippingCountry: String
      $shippingState: String
      $shippingCity: String
      $shippingPostcode: String
      $shippingPhoneNumber: String

      $billingFirstName: String
      $billingLastName: String
      $billingEmail: String
      $billingAddress: String
      $billingCountry: String
      $billingState: String
      $billingCity: String
      $billingPostcode: String
      $billingPhoneNumber: String
  ) {
      createPaymentCallback(
        input: {
          orderId: $orderId
          gatewayOrderId: $gatewayOrderId
          status: $status
          paymentSignature: $paymentSignature
          verifyToken: $verifyToken
          
          shippingFirstName: $shippingFirstName
          shippingLastName: $shippingLastName
          shippingEmail: $shippingEmail
          shippingAddress: $shippingAddress
          shippingCountry: $shippingCountry
          shippingState: $shippingState
          shippingCity: $shippingCity
          shippingPostcode: $shippingPostcode
          shippingPhoneNumber: $shippingPhoneNumber

          billingFirstName: $billingFirstName
          billingLastName: $billingLastName
          billingEmail: $billingEmail
          billingAddress: $billingAddress
          billingCountry: $billingCountry
          billingState: $billingState
          billingCity: $billingCity
          billingPostcode: $billingPostcode
          billingPhoneNumber: $billingPhoneNumber
        }
      ) {
          paymentCallback {
            id
            success
            message
            orderId
            status
            orderStatus
            gatewayStatus
          }
      }
  }
`;