1+ 'use client' ;
2+
3+ import React from 'react' ;
4+ import { SimpleDialog as Dialog , SimpleDialogContent as DialogContent } from '../ui/simple-dialog' ;
5+ import { Button } from '../ui/button' ;
6+ import { X , Shield , CheckCircle , Lock , Eye } from 'lucide-react' ;
7+
8+ interface PrivacyModalProps {
9+ onClose : ( ) => void ;
10+ }
11+
12+ const PrivacyModal : React . FC < PrivacyModalProps > = ( { onClose } ) => {
13+ // Handler for clicks outside the modal
14+ const handleOutsideClick = ( e : React . MouseEvent < HTMLDivElement > ) => {
15+ // Only close if the click was directly on the overlay (not on the modal content)
16+ if ( e . target === e . currentTarget ) {
17+ onClose ( ) ;
18+ }
19+ } ;
20+
21+ return (
22+ < div
23+ className = 'fixed inset-0 z-50 flex items-center justify-center overflow-hidden bg-black/50'
24+ onClick = { handleOutsideClick }
25+ >
26+ < div
27+ className = 'bg-white m-2 sm:m-5 max-w-2xl w-full rounded-lg p-0 overflow-hidden shadow-xl'
28+ onClick = { ( e ) => e . stopPropagation ( ) } // Prevent clicks inside from closing
29+ >
30+ < div className = 'bg-brand-pink p-2 flex items-center justify-between sm:rounded-t-lg' >
31+ < h2 className = 'text-xl font-semibold text-white flex items-center' >
32+ < Shield className = "mr-2" size = { 20 } />
33+ Privacy & Data Protection
34+ </ h2 >
35+ < button
36+ className = 'text-white focus:outline-none focus:ring-2 focus:ring-white rounded-sm'
37+ onClick = { onClose }
38+ >
39+ < X size = { 24 } />
40+ </ button >
41+ </ div >
42+
43+ < div
44+ className = 'relative overflow-auto max-h-[70vh]'
45+ style = { {
46+ background : 'linear-gradient(135deg, #f5f7fa 0%, #f8f9fb 100%)' ,
47+ } }
48+ >
49+ < div className = 'p-4 sm:p-6' >
50+ < div className = "space-y-6" >
51+ { /* How We Protect Your Data */ }
52+ < section >
53+ < h3 className = "text-lg font-semibold flex items-center text-gray-800 mb-3" >
54+ < Lock className = "mr-2 text-brand-pink" size = { 20 } />
55+ How We Protect Your Data
56+ </ h3 >
57+ < div className = "bg-white p-4 rounded-lg shadow-sm" >
58+ < p className = "mb-3 text-gray-700" >
59+ At Beacons, we prioritize your privacy and ensure your personal information is handled securely.
60+ </ p >
61+ < ul className = "list-disc pl-5 space-y-2 text-gray-700" >
62+ < li > Your data is encrypted both in transit and at rest</ li >
63+ < li > We use secure passwordless authentication (Magic Links) to protect your account</ li >
64+ < li > We only collect the minimum information needed to provide our service</ li >
65+ < li > You retain complete control over your data at all times</ li >
66+ </ ul >
67+ </ div >
68+ </ section >
69+
70+ { /* Your Rights */ }
71+ < section >
72+ < h3 className = "text-lg font-semibold flex items-center text-gray-800 mb-3" >
73+ < CheckCircle className = "mr-2 text-brand-pink" size = { 20 } />
74+ Your Rights
75+ </ h3 >
76+ < div className = "bg-white p-4 rounded-lg shadow-sm" >
77+ < p className = "mb-3 text-gray-700" >
78+ Under data protection law, you have the right to:
79+ </ p >
80+ < ul className = "list-disc pl-5 space-y-2 text-gray-700" >
81+ < li > Access your personal data</ li >
82+ < li > Correct inaccurate data</ li >
83+ < li > Request deletion of your data</ li >
84+ < li > Restrict or object to processing of your data</ li >
85+ < li > Obtain and reuse your data (data portability)</ li >
86+ < li > Withdraw consent at any time</ li >
87+ </ ul >
88+ </ div >
89+ </ section >
90+
91+ { /* Data Sharing */ }
92+ < section >
93+ < h3 className = "text-lg font-semibold flex items-center text-gray-800 mb-3" >
94+ < Eye className = "mr-2 text-brand-pink" size = { 20 } />
95+ Data Sharing
96+ </ h3 >
97+ < div className = "bg-white p-4 rounded-lg shadow-sm" >
98+ < p className = "mb-3 text-gray-700" >
99+ We only share your data:
100+ </ p >
101+ < ul className = "list-disc pl-5 space-y-2 text-gray-700" >
102+ < li > With your explicit consent</ li >
103+ < li > Only statements marked as "public" can be shared with your line manager</ li >
104+ < li > You control when and how your data is shared</ li >
105+ < li > Email sharing is initiated by you and only sent to the email address you provide</ li >
106+ </ ul >
107+ </ div >
108+ </ section >
109+ </ div >
110+
111+ < div className = "mt-6 flex justify-center" >
112+ < Button
113+ variant = 'outline'
114+ className = 'px-6'
115+ type = 'button'
116+ onClick = { onClose }
117+ >
118+ < X size = { 16 } className = 'mr-1.5' />
119+ Close
120+ </ Button >
121+ </ div >
122+ </ div >
123+ </ div >
124+ </ div >
125+ </ div >
126+ ) ;
127+ } ;
128+
129+ export default PrivacyModal ;
0 commit comments