// ===== 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 &&
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.
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).