'use client'; import { ReactNode } from 'react'; import { useLocale, useTranslations } from 'next-intl'; import { Box, Skeleton, Stack, Typography } from '@mui/material'; import { AccentCard, AppButton, AppLink, CountdownTimer, EmptyState, ErrorState, Money, PageHeader, SurfaceCard, } from '@/components'; import { ROUTES } from '@/constants'; import { formatRelativeTime, formatShamsiDate, localeTag, parseIrr } from '@/utils'; import { useNurseRequestInbox } from '@/services/bookingRequests'; import { useTodaySessions } from '@/services/bookings'; import { useNurseEarningsBalance } from '@/services/payouts'; import { coarseResponseLabel } from '@/services/bookingRequests/format'; import DashboardActivationSlot from './DashboardActivationSlot'; /** The pill's urgency tiers (ui-phase-7 §3.4): teal >2h · amber <2h · terracotta <30min. */ const URGENT_THRESHOLD_SECONDS = 30 * 60; const WARN_THRESHOLD_SECONDS = 2 * 60 * 60; /** * The nurse «امروز» home — the first bottom-nav destination. * * Rebuilt for the phone-width frame. The previous version stacked five same-weight cards, each * repeating its own icon + bold heading + inline "see all" button; at 480px the buttons wrapped * mid-word, the countdown collided with the request title, and nothing on the screen looked more * important than anything else. This version gives the page one visual hierarchy: exactly one hero * action (the next visit), then sections introduced by a plain label with a text link instead of a * competing button. * * The greeting/identity strip that used to sit above all of it is gone: it spent the most valuable * row on the screen restating the signed-in name to the person who typed the phone number, and the * badge beside it duplicated the activation tracker further down. Identity now lives in the shell's * top bar (`NurseAccountButton`), where it costs no content height and opens the account hub. * * Composition only — every widget reads a query that is already cached elsewhere in the shell, and * order encodes urgency: a missed request expires, an unread earnings figure does not. */ export default function NurseDashboardScreen() { const t = useTranslations('dashboard'); return ( {/* Load-bearing now that the bottom nav is icon-only: this is the only place the current section is named, and the page's only h1. */} ); } /** * A section label + an optional text link. Deliberately not a button: on a 480px row a * `