import { gql } from '@apollo/client';
import { BASE_CART } from 'graphql/fragments/cart/baseCart';

export const ADD_SHIPPING_METHOD = gql`
  mutation addShippingMethod($input: AddShippingMethodInput!) {
    addShippingMethod(input: $input) {
      cart {
        ...BaseCartFragment
      }
      error {
        code
        message
      }
    }
  }
  ${BASE_CART}
`;

export const GET_SHIPPING_METHODS_TEXT = gql`
  query getShippingMethodsText($where: OrderedListFilter_cfContent) {
    orderedListCollection(where: $where) {
      items {
        entriesCollection {
          items {
            ... on ContentTypeEntry_cfContent {
              subtitle
              slug
              title
            }
          }
        }
      }
    }
  }
`;
