import gql from 'graphql-tag' ; export const PERFORMANCE_METRICS = gql `
  query data(
    $timeStart: String!
    $timeEnd: String!
    $locationId: String!
    $event: String!
  ) {
    fetchRegistrationMetrics(
      timeStart: $timeStart
      timeEnd: $timeEnd
      locationId: $locationId
      event: $event
    ) {
      timeFrames {
        details {
          locationId
          regWithin45d
          regWithin45dTo1yr
          regWithin1yrTo5yr
          regOver5yr
          total
        }
        total {
          regWithin45d
          regWithin45dTo1yr
          regWithin1yrTo5yr
          regOver5yr
          total
        }
      }
      genderBasisMetrics {
        details {
          location
          maleUnder18
          femaleUnder18
          maleOver18
          femaleOver18
          total
        }
        total {
          maleUnder18
          femaleUnder18
          maleOver18
          femaleOver18
          total
        }
      }
      estimated45DayMetrics {
        details {
          locationId
          estimatedRegistration
          registrationIn45Day
          estimationYear
          estimationLocationLevel
          estimationPercentage
        }
        total {
          estimatedRegistration
          registrationIn45Day
          estimationPercentage
        }
      }
      payments {
        details {
          locationId
          total
        }
        total {
          total
        }
      }
    }
  }
` ; export const OPERATIONAL_REPORTS_METRICS_FOR_OFFICE = gql `
  query data($timeStart: String!, $timeEnd: String!, $locationId: String!) {
    getApplicationsStartedMetrics(
      timeStart: $timeStart
      timeEnd: $timeEnd
      locationId: $locationId
    ) {
      fieldAgentApplications
      hospitalApplications
      officeApplications
    }
  }
` ; export const OPERATIONAL_REPORTS_METRICS = gql `
  query data($timeStart: String!, $timeEnd: String!, $locationId: String!) {
    getEventEstimationMetrics(
      timeStart: $timeStart
      timeEnd: $timeEnd
      locationId: $locationId
    ) {
      birth45DayMetrics {
        actualRegistration
        estimatedRegistration
        estimatedPercentage
        malePercentage
        femalePercentage
      }
      death45DayMetrics {
        actualRegistration
        estimatedRegistration
        estimatedPercentage
        malePercentage
        femalePercentage
      }
    }

    getApplicationsStartedMetrics(
      timeStart: $timeStart
      timeEnd: $timeEnd
      locationId: $locationId
    ) {
      fieldAgentApplications
      hospitalApplications
      officeApplications
    }
  }
` ;