#import "../Fragments/System.graphql"

#import "../Fragments/PageLink/AccountPageLink.graphql"
#import "../Fragments/PageLink/CollectionPageLink.graphql"
#import "../Fragments/PageLink/ContentPageLink.graphql"
#import "../Fragments/PageLink/DestinationCityPageLink.graphql"
#import "../Fragments/PageLink/DestinationCountryPageLink.graphql"
#import "../Fragments/PageLink/DestinationOverviewPageLink.graphql"
#import "../Fragments/PageLink/HotelPageLink.graphql"
#import "../Fragments/PageLink/LoyaltyPageLink.graphql"
#import "../Fragments/PageLink/StartPageLink.graphql"

#import "../Fragments/AccountPage/Ref.graphql"
#import "../Fragments/CollectionPage/Ref.graphql"
#import "../Fragments/ContentPage/Ref.graphql"
#import "../Fragments/DestinationCityPage/Ref.graphql"
#import "../Fragments/DestinationCountryPage/Ref.graphql"
#import "../Fragments/DestinationOverviewPage/Ref.graphql"
#import "../Fragments/HotelPage/Ref.graphql"
#import "../Fragments/LoyaltyPage/Ref.graphql"
#import "../Fragments/StartPage/Ref.graphql"

#import "../Fragments/Footer/AppDownloads.graphql"
#import "../Fragments/Footer/SocialMedia.graphql"

query GetFooter($locale: String!) {
  all_footer(limit: 1, locale: $locale) {
    items {
      main_links {
        title
        open_in_new_tab
        link {
          href
          title
        }
        pageConnection {
          edges {
            node {
              ...AccountPageLink
              ...CollectionPageLink
              ...ContentPageLink
              ...DestinationCityPageLink
              ...DestinationCountryPageLink
              ...DestinationOverviewPageLink
              ...HotelPageLink
              ...LoyaltyPageLink
              ...StartPageLink
            }
          }
        }
      }
      secondary_links {
        title
        links {
          title
          open_in_new_tab
          pageConnection {
            edges {
              node {
                ...AccountPageLink
                ...CollectionPageLink
                ...ContentPageLink
                ...DestinationCityPageLink
                ...DestinationCountryPageLink
                ...DestinationOverviewPageLink
                ...HotelPageLink
                ...LoyaltyPageLink
                ...StartPageLink
              }
            }
          }
          link {
            href
            title
          }
        }
      }
      tertiary_links {
        title
        open_in_new_tab
        link {
          href
          title
        }
        pageConnection {
          edges {
            node {
              ...AccountPageLink
              ...CollectionPageLink
              ...ContentPageLink
              ...DestinationCityPageLink
              ...DestinationCountryPageLink
              ...DestinationOverviewPageLink
              ...HotelPageLink
              ...LoyaltyPageLink
              ...StartPageLink
            }
          }
        }
      }
      ...AppDownloads
      ...SocialMedia
    }
  }
}

query GetFooterRef($locale: String!) {
  all_footer(limit: 1, locale: $locale) {
    items {
      main_links {
        pageConnection {
          edges {
            node {
              ...AccountPageRef
              ...CollectionPageRef
              ...ContentPageRef
              ...DestinationCityPageRef
              ...DestinationCountryPageRef
              ...DestinationOverviewPageRef
              ...HotelPageRef
              ...LoyaltyPageRef
              ...StartPageRef
            }
          }
        }
      }
      secondary_links {
        links {
          pageConnection {
            edges {
              node {
                ...AccountPageRef
                ...CollectionPageRef
                ...ContentPageRef
                ...DestinationCityPageRef
                ...DestinationCountryPageRef
                ...DestinationOverviewPageRef
                ...HotelPageRef
                ...LoyaltyPageRef
                ...StartPageRef
              }
            }
          }
        }
      }
      tertiary_links {
        pageConnection {
          edges {
            node {
              ...AccountPageRef
              ...CollectionPageRef
              ...ContentPageRef
              ...DestinationCityPageRef
              ...DestinationCountryPageRef
              ...DestinationOverviewPageRef
              ...HotelPageRef
              ...LoyaltyPageRef
              ...StartPageRef
            }
          }
        }
      }
      system {
        ...System
      }
    }
  }
}
