// ===== DATA PRIVACY CONSENT GATE (RA 10173) ===== // Shown once before sign-in. Records informed, explicit consent before any // personal data is collected, per the PH Data Privacy Act of 2012. const CONSENT_KEY = 'nrsa_consent'; const CONSENT_VERSION = '1.0'; // bump to re-prompt all users when the notice changes function getConsent() { try { return JSON.parse(localStorage.getItem(CONSENT_KEY)) || null; } catch (e) { return null; } } function ConsentScreen({ t, dark, onAccept }) { const [openNotice, setOpenNotice] = useState(false); const [agreePrivacy, setAgreePrivacy] = useState(false); const [agreeTerms, setAgreeTerms] = useState(false); const [marketing, setMarketing] = useState(false); const canProceed = agreePrivacy && agreeTerms; const collected = [ { icon: '🪪', label: 'Identity', text: 'Name, age, government ID / driver\u2019s license (for verification)' }, { icon: '📱', label: 'Contact', text: 'Mobile number, email address, home address' }, { icon: '🎓', label: 'Background', text: 'Whether you study or work, your school or industry' }, { icon: '📍', label: 'Location', text: 'GPS location for live traffic, crash reports & SOS' }, { icon: '🚨', label: 'Incident data', text: 'Crash reports and evidence you choose to submit' }, ]; const rights = [ 'Be informed about how your data is processed', 'Access and obtain a copy of your data', 'Correct or update inaccurate data', 'Object to processing or withdraw consent', 'Have your data erased or blocked (right to erasure)', 'File a complaint with the National Privacy Commission', ]; const Check = ({ on }) => ( {on && } ); return (
{/* Hero */}
🔐
Your Privacy Matters
Before you continue, please review how NRSA collects and protects your personal data under the Data Privacy Act of 2012 (RA 10173).
{/* Body */}
{/* What we collect */}
WHAT WE COLLECT
{collected.map((c, i) => (
0 ? `1px solid ${t.border}` : 'none' }}> {c.icon}
{c.label}
{c.text}
))}
{/* Why / how protected — quick assurances */}
{[ { icon: 'shield', title: 'Why', text: 'To verify users, power road-safety tools & respond to incidents.' }, { icon: 'check', title: 'How it\u2019s kept safe', text: 'Encrypted, access-controlled, never sold to third parties.' }, ].map(b => (
{b.title}
{b.text}
))}
{/* Expandable full notice */}

The National Road Safety Alliance (\u201cNRSA\u201d) acts as the Personal Information Controller for the data you provide. We process your personal and sensitive personal information only for the purposes described above, on the lawful basis of your consent and our legitimate road-safety mandate.

Your rights as a data subject
{rights.map((r, i) => (
{r}
))}

Data is retained only as long as necessary for these purposes or as required by law. To exercise your rights or reach our Data Protection Officer, email dpo@nrsa.org.ph. You may also lodge a complaint with the National Privacy Commission (privacy.gov.ph).

{/* Consent checkboxes */}
canProceed && onAccept({ privacy: true, terms: true, marketing, version: CONSENT_VERSION, at: new Date().toISOString() })} style={{ opacity: canProceed ? 1 : 0.5, minHeight: 54, fontSize: 16, marginTop: 8 }}> {canProceed ? 'Agree & Continue' : 'Please accept the required items'}
You can withdraw consent anytime in Profile → Privacy & Safety.
); } Object.assign(window, { ConsentScreen, getConsent, CONSENT_KEY, CONSENT_VERSION });