'use client'; import { useState } from 'react'; import { Dialog, DialogTitle, DialogContent, DialogActions, Button, Typography, Box, Checkbox, FormControlLabel, Link, Alert, Divider, } from '@mui/material'; import { Gavel, Warning } from '@mui/icons-material'; import { LegalDocumentViewer } from './LegalDocumentViewer'; interface EULADialogProps { open: boolean; onAccept: () => void; onDecline: () => void; } export function EULADialog({ open, onAccept, onDecline }: EULADialogProps) { const [agreedToTerms, setAgreedToTerms] = useState(false); const [agreedToPrivacy, setAgreedToPrivacy] = useState(false); const [agreedToEULA, setAgreedToEULA] = useState(false); const [viewingDocument, setViewingDocument] = useState<{ type: 'terms' | 'privacy' | 'eula' | null; title: string; }>({ type: null, title: '' }); const canAccept = agreedToTerms && agreedToPrivacy && agreedToEULA; const handleAccept = () => { if (canAccept) { onAccept(); } }; const openDocument = (type: 'terms' | 'privacy' | 'eula', title: string) => (e: React.MouseEvent) => { e.preventDefault(); setViewingDocument({ type, title }); }; const closeDocumentViewer = () => { setViewingDocument({ type: null, title: '' }); }; return ( <> { // Prevent closing by clicking outside or pressing ESC if (reason === 'backdropClick' || reason === 'escapeKeyDown') { return; } }} sx={{ '& .MuiDialog-paper': { borderRadius: 2, }, }} > Welcome to ParentFlow Please review and accept our legal agreements } sx={{ mb: 3 }}> To use ParentFlow, you must read and accept our Terms of Service, Privacy Policy, and End User License Agreement (EULA). Click on each link below to read the full documents. Important Highlights
  • Medical Disclaimer: This app is NOT a medical device and does not provide medical advice. Always consult qualified healthcare professionals for medical concerns.
  • AI Features: AI responses may not always be accurate. You use AI features at your own risk.
  • Children's Privacy: We comply with COPPA and GDPR. You control your child's data and can delete it anytime.
  • Data Collection: We collect activity data, photos, and AI chat messages to provide the service. We do NOT sell your data.
  • Your Rights: You can access, export, or delete your data at any time through app settings.
setAgreedToTerms(e.target.checked)} color="primary" /> } label={ I have read and agree to the{' '} Terms of Service } /> setAgreedToPrivacy(e.target.checked)} color="primary" /> } label={ I have read and agree to the{' '} Privacy Policy } /> setAgreedToEULA(e.target.checked)} color="primary" /> } label={ I have read and agree to the{' '} End User License Agreement (EULA) } /> Emergency Disclaimer: In case of medical emergencies, call your local emergency number immediately (911 in the US). This app is not for emergency situations.
{/* Legal Document Viewer - appears on top of EULA dialog */} {viewingDocument.type && ( )} ); }