import gql from 'graphql-tag';

import { refillFragment } from './refill';
import { servicepackFragment } from './servicepack';
import { availableRateplanFragment } from './availableRateplan';

export const rateplanFragment = gql`
  fragment RateplanFragment on Profile {
    rateplan {
      id
      isPrepaid
      typeId
      title
      shortTitle
      isVip
      includedDataAmountInMb
      price
      mobileCount
      internetCount
      numberForwardCount
      wifiExtenderCount
      backupCount
      availableRefills {
        name
        refillType
        description
        refills {
          ...RefillFragment
        }
      }
      availableServicepacks {
        name
        servicepackType
        description
        canModify
        servicepacks {
          ...ServicepackFragment
        }
      }
      availableRateplans {
        name
        description
        canModify
        rateplanType
        rateplans {
          ...AvailableRateplanFragment
        }
      }
    }

  }
  ${availableRateplanFragment}
  ${refillFragment}
  ${servicepackFragment}
`;
