import { gql } from '@apollo/client';

export const GET_DASHBOARD = gql`
  query GetDashboard($childId: String) {
    dashboard(childId: $childId) {
      children {
        id
        name
        birthDate
        gender
        photoUrl
      }
      selectedChild {
        id
        name
        birthDate
        gender
        photoUrl
      }
      recentActivities {
        id
        type
        startedAt
        endedAt
        notes
        metadata
        childId
        loggedBy
        logger {
          id
          name
        }
      }
      todaySummary {
        date
        feedingCount
        totalFeedingAmount
        sleepCount
        totalSleepDuration
        diaperCount
        medicationCount
      }
      familyMembers {
        userId
        familyId
        role
        user {
          id
          name
          email
        }
      }
      totalChildren
      totalActivitiesToday
    }
  }
`;
