// health/WakeSchedule.jsx // Bottom sheet (medium detent) over the Sleep detail. Per-day wake editor, // Mon โ†’ Sun, with time wheel preview for the focused row (Thursday). function WakeSchedule({ dark = false }) { const rows = [ { d: 'Mon', t: '6:15 AM', goal: '8h 00m', enabled: true }, { d: 'Tue', t: '6:15 AM', goal: '8h 00m', enabled: true }, { d: 'Wed', t: '6:15 AM', goal: '8h 00m', enabled: true }, { d: 'Thu', t: '5:45 AM', goal: '8h 30m', enabled: true, focus: true }, { d: 'Fri', t: '6:15 AM', goal: '8h 00m', enabled: true }, { d: 'Sat', t: '8:30 AM', goal: '9h 00m', enabled: true }, { d: 'Sun', t: '8:30 AM', goal: '9h 00m', enabled: false }, ]; const Wheel = ({ values, active }) => { const visible = 5; const start = Math.max(0, active - 2); const slice = values.slice(start, start + visible); return (
{slice.map((v, i) => { const isActive = (start + i) === active; const dist = Math.abs((start + i) - active); return (
{v}
); })}
{/* center selection band */}
); }; const hours = ['3', '4', '5', '6', '7', '8']; const minutes = ['15', '30', '45', '00', '15', '30']; const ampms = ['', '', 'AM', 'PM', '', '']; return ( {/* Dimmed parent screen โ€” Sleep detail mini */}
Last night
6h 12m
{/* Scrim */}
Cancel Wake schedule Done
{/* Time wheel for focused day */}
Thursday wake
Editing
Sleep goal
8h 30m
{/* Day rows */}
{rows.map((r, i) => (
{r.d.slice(0, 1)}
{r.d === 'Mon' ? 'Monday' : r.d === 'Tue' ? 'Tuesday' : r.d === 'Wed' ? 'Wednesday' : r.d === 'Thu' ? 'Thursday' : r.d === 'Fri' ? 'Friday' : r.d === 'Sat' ? 'Saturday' : 'Sunday'}
{r.enabled ? `Goal ยท ${r.goal}` : 'Off โ€” no alarm'}
{r.t}
{/* iOS toggle */}
))}
); } window.WakeSchedule = WakeSchedule;