import gql from 'graphql-tag';

export const CONTRACTSLOTS = gql`
  query ContractSlots($input: ContractSlotsInput!) {
    contractSlots(input: $input) {
      filledSlots
      freeSlots
      offerName
      slotCount
      slug
      variants {
        ... on ProvisionedSubscriptionVariant {
          creditControls {
            description
            name
            type
            widgetType
            valueOptions {
              value
              isDefault
              description
            }
          }
          serviceType
        }
      }
    }
  }
`;

export const UPDATECREDITCONTROLSETTINGS = gql`
  mutation UpdateCreditControlSettings($input: UpdateCreditControlSettingsInput!) {
    updateCreditControlSettings(input: $input) {
      id
      contractItemId
      canToggle
      isToggledOn
    }
  }
`;
