export const profile = `
query Rider($id:String){
    rider(id:$id){
      _id
      name
      username
      available
    }
  }`
export const assignedOrders = `query AssignedOrders($id:String){
    assignedOrders(id:$id){
      _id
      rider{
        _id
      }
      order_id
      delivery_address{
        latitude
        longitude
        delivery_address
        details
        label
      }
      delivery_charges
      payment_method
      order_amount
      paid_amount
      order_status
      payment_status
      user{
        _id
        name
        phone
        email
      }
      items{
        _id
        food{
          _id
          title
        }
        quantity
        variation{
          _id
          title
          price
        }
        addons{
          title
          options{
            title
            price
          }
        }
      }
      createdAt
    }
  }`

export const subscriptionAssignRider = `subscription SubscriptionAssignRider($riderId:String!){
    subscriptionAssignRider(riderId:$riderId){
      userId
      origin
      order{
      _id
      rider{
        _id
      }
      order_id
      delivery_address{
        latitude
        longitude
        delivery_address
        details
        label
      }
      delivery_charges
      payment_method
      order_amount
      paid_amount
      order_status
      payment_status
      user{
        _id
        name
        phone
        email
      }
      items{
        _id
        food{
          _id
          title
        }
        quantity
        variation{
          _id
          title
          price
        }
        addons{
          _id
          title
          options{
            _id
            title
            price
          }
        }
      }
      createdAt
     }
    }
  }`

export const configuration = `query Configuration{
    configuration{
      _id
      currency
      currency_symbol
      delivery_charges
    }
  }`

export const unassignedOrders = `query UnAssignedOrders{
    unassignedOrders{
      _id
      rider{
        _id
      }
      order_id
      delivery_address{
        latitude
        longitude
        delivery_address
        details
        label
      }
      delivery_charges
      payment_method
      order_amount
      paid_amount
      order_status
      payment_status
      user{
        _id
        name
        phone
        email
      }
      items{
        _id
        food{
          _id
          title
        }
        quantity
        variation{
          _id
          title
          price
        }
        addons{
          _id
          title
          options{
            _id
            title
            price
          }
        }
      }
      createdAt
    }
  }`

export const subscriptionUnAssignedOrder = `subscription SubscriptionUnAssignedOrder{
    unassignedOrder{
      userId
      origin
      order{
      _id
      rider{
        _id
      }
      order_id
      delivery_address{
        latitude
        longitude
        delivery_address
        details
        label
      }
      delivery_charges
      payment_method
      order_amount
      paid_amount
      order_status
      payment_status
      user{
        _id
        name
        phone
        email
      }
      items{
        _id
        food{
          _id
          title
        }
        quantity
        variation{
          _id
          title
          price
        }
        addons{
          _id
          title
          options{
            _id
            title
            price
          }
        }
      }
      createdAt
     }
    }
  }`
