@tantainnovative/ndpr-toolkit 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +224 -32
- package/dist/index.d.ts +442 -18
- package/dist/index.js +190 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +190 -1
- package/dist/index.mjs.map +1 -1
- package/dist/unstyled.d.mts +4 -4
- package/dist/unstyled.d.ts +22 -2
- package/package.json +28 -32
- package/dist/components/breach-notification/BreachNotificationForm.d.ts +0 -18
- package/dist/components/breach-notification/BreachNotificationForm.d.ts.map +0 -1
- package/dist/components/consent/ConsentBanner.d.ts +0 -30
- package/dist/components/consent/ConsentBanner.d.ts.map +0 -1
- package/dist/components/consent/ConsentManager.d.ts +0 -51
- package/dist/components/consent/ConsentManager.d.ts.map +0 -1
- package/dist/components/consent/ConsentSettings.d.ts +0 -15
- package/dist/components/consent/ConsentSettings.d.ts.map +0 -1
- package/dist/components/consent/unstyled/UnstyledConsentBanner.d.ts +0 -7
- package/dist/components/consent/unstyled/UnstyledConsentBanner.d.ts.map +0 -1
- package/dist/components/consent/unstyled/UnstyledConsentSettings.d.ts +0 -7
- package/dist/components/consent/unstyled/UnstyledConsentSettings.d.ts.map +0 -1
- package/dist/components/consent/unstyled/UnstyledConsentToggle.d.ts +0 -8
- package/dist/components/consent/unstyled/UnstyledConsentToggle.d.ts.map +0 -1
- package/dist/components/consent/unstyled/index.d.ts +0 -4
- package/dist/components/consent/unstyled/index.d.ts.map +0 -1
- package/dist/components/data-subject-rights/DataSubjectRequestForm.d.ts +0 -14
- package/dist/components/data-subject-rights/DataSubjectRequestForm.d.ts.map +0 -1
- package/dist/components/docs/DocLayout.d.ts +0 -9
- package/dist/components/docs/DocLayout.d.ts.map +0 -1
- package/dist/components/docs/index.d.ts +0 -2
- package/dist/components/docs/index.d.ts.map +0 -1
- package/dist/components/dpia/DPIAQuestionnaire.d.ts +0 -9
- package/dist/components/dpia/DPIAQuestionnaire.d.ts.map +0 -1
- package/dist/components/privacy-policy/PolicyGenerator.d.ts +0 -12
- package/dist/components/privacy-policy/PolicyGenerator.d.ts.map +0 -1
- package/dist/components/privacy-policy/data.d.ts +0 -8
- package/dist/components/privacy-policy/data.d.ts.map +0 -1
- package/dist/components/privacy-policy/shared/CheckboxField.d.ts +0 -13
- package/dist/components/privacy-policy/shared/CheckboxField.d.ts.map +0 -1
- package/dist/components/privacy-policy/shared/CheckboxGroup.d.ts +0 -13
- package/dist/components/privacy-policy/shared/CheckboxGroup.d.ts.map +0 -1
- package/dist/components/privacy-policy/shared/FormField.d.ts +0 -13
- package/dist/components/privacy-policy/shared/FormField.d.ts.map +0 -1
- package/dist/components/privacy-policy/shared/StepIndicator.d.ts +0 -8
- package/dist/components/privacy-policy/shared/StepIndicator.d.ts.map +0 -1
- package/dist/components/privacy-policy/steps/CustomSectionsStep.d.ts +0 -15
- package/dist/components/privacy-policy/steps/CustomSectionsStep.d.ts.map +0 -1
- package/dist/components/privacy-policy/steps/DataCollectionStep.d.ts +0 -20
- package/dist/components/privacy-policy/steps/DataCollectionStep.d.ts.map +0 -1
- package/dist/components/privacy-policy/steps/DataSharingStep.d.ts +0 -34
- package/dist/components/privacy-policy/steps/DataSharingStep.d.ts.map +0 -1
- package/dist/components/privacy-policy/steps/OrganizationInfoStep.d.ts +0 -17
- package/dist/components/privacy-policy/steps/OrganizationInfoStep.d.ts.map +0 -1
- package/dist/components/privacy-policy/steps/PolicyPreviewStep.d.ts +0 -30
- package/dist/components/privacy-policy/steps/PolicyPreviewStep.d.ts.map +0 -1
- package/dist/components/ui/Badge.d.ts +0 -10
- package/dist/components/ui/Badge.d.ts.map +0 -1
- package/dist/components/ui/Button.d.ts +0 -11
- package/dist/components/ui/Button.d.ts.map +0 -1
- package/dist/components/ui/Card.d.ts +0 -10
- package/dist/components/ui/Card.d.ts.map +0 -1
- package/dist/components/ui/Checkbox.d.ts +0 -8
- package/dist/components/ui/Checkbox.d.ts.map +0 -1
- package/dist/components/ui/FormField.d.ts +0 -11
- package/dist/components/ui/FormField.d.ts.map +0 -1
- package/dist/components/ui/Input.d.ts +0 -6
- package/dist/components/ui/Input.d.ts.map +0 -1
- package/dist/components/ui/Select.d.ts +0 -6
- package/dist/components/ui/Select.d.ts.map +0 -1
- package/dist/components/ui/TextArea.d.ts +0 -6
- package/dist/components/ui/TextArea.d.ts.map +0 -1
- package/dist/components/ui/dialog.d.ts +0 -18
- package/dist/components/ui/dialog.d.ts.map +0 -1
- package/dist/components/ui/label.d.ts +0 -5
- package/dist/components/ui/label.d.ts.map +0 -1
- package/dist/components/ui/switch.d.ts +0 -5
- package/dist/components/ui/switch.d.ts.map +0 -1
- package/dist/components/ui/tabs.d.ts +0 -8
- package/dist/components/ui/tabs.d.ts.map +0 -1
- package/dist/contexts/ConsentContext.d.ts +0 -35
- package/dist/contexts/ConsentContext.d.ts.map +0 -1
- package/dist/contexts/GenericConsentContext.d.ts +0 -11
- package/dist/contexts/GenericConsentContext.d.ts.map +0 -1
- package/dist/hooks/useConsent.d.ts +0 -12
- package/dist/hooks/useConsent.d.ts.map +0 -1
- package/dist/hooks/useConsentActions.d.ts +0 -12
- package/dist/hooks/useConsentActions.d.ts.map +0 -1
- package/dist/hooks/useConsentManager.d.ts +0 -14
- package/dist/hooks/useConsentManager.d.ts.map +0 -1
- package/dist/hooks/useConsentState.d.ts +0 -10
- package/dist/hooks/useConsentState.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/lib/consentService.d.ts +0 -11
- package/dist/lib/consentService.d.ts.map +0 -1
- package/dist/lib/dpiaQuestions.d.ts +0 -3
- package/dist/lib/dpiaQuestions.d.ts.map +0 -1
- package/dist/lib/requestService.d.ts +0 -10
- package/dist/lib/requestService.d.ts.map +0 -1
- package/dist/lib/utils.d.ts +0 -3
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/types/consent.d.ts +0 -57
- package/dist/types/consent.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -91
- package/dist/types/index.d.ts.map +0 -1
- package/dist/unstyled.d.ts.map +0 -1
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/contexts/ConsentContext.tsx","../src/contexts/GenericConsentContext.tsx","../src/lib/utils.ts","../src/components/ui/Button.tsx","../src/components/consent/ConsentBanner.tsx","../src/components/ui/switch.tsx","../src/components/ui/dialog.tsx","../src/components/consent/ConsentSettings.tsx","../src/components/consent/ConsentManager.tsx","../src/components/consent/unstyled/UnstyledConsentBanner.tsx","../src/components/consent/unstyled/UnstyledConsentSettings.tsx","../src/components/consent/unstyled/UnstyledConsentToggle.tsx","../src/hooks/useConsentState.ts","../src/hooks/useConsentActions.ts","../src/hooks/useConsentManager.ts","../src/lib/consentService.ts","../src/index.ts"],"names":["ConsentContext","createContext","defaultConsent","ConsentProvider","children","initialConsent","onConsentChange","storageKey","consentState","setConsentState","useState","stored","parsed","__spreadValues","e","hasUserConsented","setHasUserConsented","showBanner","setShowBanner","showSettings","setShowSettings","useEffect","acceptAll","useCallback","rejectAll","savePreferences","preferences","prev","__spreadProps","updateConsent","category","value","openSettings","closeSettings","React","useConsent","context","useContext","createConsentContext","categories","getDefaultConsent","cat","newConsent","key","cn","inputs","twMerge","clsx","buttonVariants","cva","Button","_a","_b","className","variant","size","asChild","props","__objRest","de","Slot","ConsentBanner","renderBanner","theme","position","animation","fullWidth","maxWidth","unstyled","Switch","Q","j","Dialog","open","onOpenChange","w","DialogContent","ref","DialogHeader","DialogTitle","DialogDescription","cookieCategories","ConsentSettings","renderSettings","handleSave","checked","ConsentManagerInner","headless","components","consent","renderProps","ConsentManager","innerProps","UnstyledConsentBanner","UnstyledConsentSettings","UnstyledConsentToggle","label","useConsentState","useConsentActions","useConsentManager","listenersRef","useRef","previousStateRef","emit","event","data","listeners","listener","on","off","allAccepted","CONSENT_STORAGE_KEY","CONSENT_HISTORY_KEY","getConsentHistoryHelper","storedHistory","error","consentService","consents","userId","consentRecord","uuidv4","history","storedConsent","changeReason","type","current","cookieUtils","name","days","date","expires","nameEQ","ca","i","c","consentStorage"],"mappings":"wpBAAA,IAAA,EAAA,CAAA,MAAA,CAAA,cAAA,CAAA,EAAA,CAAA,MAAA,CAAA,gBAAA,CAAA,IAAA,EAAA,CAAA,MAAA,CAAA,yBAAA,CAAA,IAAA,CAAA,CAAA,MAAA,CAAA,qBAAA,CAAA,IAAA,EAAA,CAAA,MAAA,CAAA,SAAA,CAAA,cAAA,CAAA,EAAA,CAAA,MAAA,CAAA,SAAA,CAAA,oBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,IAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,UAAA,CAAA,IAAA,CAAA,YAAA,CAAA,IAAA,CAAA,QAAA,CAAA,IAAA,CAAA,KAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,IAAA,IAAA,CAAA,IAAA,CAAA,GAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,IAAA,IAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,OAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,IAAA,CAAA,CAAA,CA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,aAAa,UAAA,CAAWA,CAAG,EAC7B,CACF","file":"index.js","sourcesContent":["import React, { createContext, useContext, useState, useCallback, useEffect, ReactNode } from 'react';\n\nexport interface ConsentCategories {\n necessary: boolean;\n analytics: boolean;\n marketing: boolean;\n functional: boolean;\n [key: string]: boolean;\n}\n\nexport interface ConsentState {\n hasUserConsented: boolean;\n consentState: ConsentCategories;\n showBanner: boolean;\n showSettings: boolean;\n}\n\nexport interface ConsentActions {\n acceptAll: () => void;\n rejectAll: () => void;\n savePreferences: (preferences: Partial<ConsentCategories>) => void;\n openSettings: () => void;\n closeSettings: () => void;\n updateConsent: (category: keyof ConsentCategories, value: boolean) => void;\n}\n\nexport interface ConsentContextValue extends ConsentState, ConsentActions {}\n\nconst ConsentContext = createContext<ConsentContextValue | undefined>(undefined);\n\nexport interface ConsentProviderProps {\n children: ReactNode;\n initialConsent?: Partial<ConsentCategories>;\n onConsentChange?: (consent: ConsentCategories) => void;\n storageKey?: string;\n}\n\nconst defaultConsent: ConsentCategories = {\n necessary: true, // Always true\n analytics: false,\n marketing: false,\n functional: false,\n};\n\nexport function ConsentProvider({\n children,\n initialConsent = {},\n onConsentChange,\n storageKey = 'ndpr-consent',\n}: ConsentProviderProps) {\n const [consentState, setConsentState] = useState<ConsentCategories>(() => {\n // Try to load from localStorage\n if (typeof window !== 'undefined') {\n const stored = localStorage.getItem(storageKey);\n if (stored) {\n try {\n const parsed = JSON.parse(stored);\n return { ...defaultConsent, ...parsed };\n } catch (e) {\n console.error('Failed to parse consent from localStorage', e);\n }\n }\n }\n return { ...defaultConsent, ...initialConsent };\n });\n\n const [hasUserConsented, setHasUserConsented] = useState(() => {\n if (typeof window !== 'undefined') {\n return localStorage.getItem(`${storageKey}-set`) === 'true';\n }\n return false;\n });\n\n const [showBanner, setShowBanner] = useState(!hasUserConsented);\n const [showSettings, setShowSettings] = useState(false);\n\n // Persist consent to localStorage\n useEffect(() => {\n if (typeof window !== 'undefined' && hasUserConsented) {\n localStorage.setItem(storageKey, JSON.stringify(consentState));\n localStorage.setItem(`${storageKey}-set`, 'true');\n }\n }, [consentState, hasUserConsented, storageKey]);\n\n // Notify parent of consent changes\n useEffect(() => {\n if (hasUserConsented && onConsentChange) {\n onConsentChange(consentState);\n }\n }, [consentState, hasUserConsented, onConsentChange]);\n\n const acceptAll = useCallback(() => {\n const newConsent: ConsentCategories = {\n necessary: true,\n analytics: true,\n marketing: true,\n functional: true,\n };\n setConsentState(newConsent);\n setHasUserConsented(true);\n setShowBanner(false);\n setShowSettings(false);\n }, []);\n\n const rejectAll = useCallback(() => {\n const newConsent: ConsentCategories = {\n necessary: true,\n analytics: false,\n marketing: false,\n functional: false,\n };\n setConsentState(newConsent);\n setHasUserConsented(true);\n setShowBanner(false);\n setShowSettings(false);\n }, []);\n\n const savePreferences = useCallback((preferences: Partial<ConsentCategories>) => {\n setConsentState(prev => ({\n ...prev,\n ...preferences,\n necessary: true, // Always keep necessary as true\n }));\n setHasUserConsented(true);\n setShowBanner(false);\n setShowSettings(false);\n }, []);\n\n const updateConsent = useCallback((category: keyof ConsentCategories, value: boolean) => {\n if (category === 'necessary') return; // Can't change necessary cookies\n \n setConsentState(prev => ({\n ...prev,\n [category]: value,\n }));\n }, []);\n\n const openSettings = useCallback(() => {\n setShowSettings(true);\n setShowBanner(false);\n }, []);\n\n const closeSettings = useCallback(() => {\n setShowSettings(false);\n }, []);\n\n const value: ConsentContextValue = {\n hasUserConsented,\n consentState,\n showBanner,\n showSettings,\n acceptAll,\n rejectAll,\n savePreferences,\n openSettings,\n closeSettings,\n updateConsent,\n };\n\n return (\n <ConsentContext.Provider value={value}>\n {children}\n </ConsentContext.Provider>\n );\n}\n\nexport function useConsent() {\n const context = useContext(ConsentContext);\n if (!context) {\n throw new Error('useConsent must be used within a ConsentProvider');\n }\n return context;\n}\n\n// Export for external use\nexport { ConsentContext };","import React, { createContext, useContext, useState, useCallback, useEffect, ReactNode } from 'react';\nimport {\n BaseConsentCategories,\n DefaultConsentCategories,\n ConsentState,\n ConsentActions,\n ConsentContextValue,\n ConsentProviderProps,\n} from '@/types/consent';\n\n/**\n * Factory function to create a typed consent context\n */\nexport function createConsentContext<T extends BaseConsentCategories = DefaultConsentCategories>() {\n const ConsentContext = createContext<ConsentContextValue<T> | undefined>(undefined);\n\n function ConsentProvider({\n children,\n initialConsent = {} as Partial<T>,\n onConsentChange,\n storageKey = 'ndpr-consent',\n categories,\n }: ConsentProviderProps<T>) {\n const getDefaultConsent = (): T => {\n const defaultConsent: any = { necessary: true };\n \n if (categories) {\n categories.forEach(cat => {\n if (cat.id !== 'necessary') {\n defaultConsent[cat.id] = false;\n }\n });\n } else {\n // Use default categories\n defaultConsent.analytics = false;\n defaultConsent.marketing = false;\n defaultConsent.functional = false;\n }\n \n return defaultConsent as T;\n };\n\n const [consentState, setConsentState] = useState<T>(() => {\n // Try to load from localStorage\n if (typeof window !== 'undefined') {\n const stored = localStorage.getItem(storageKey);\n if (stored) {\n try {\n const parsed = JSON.parse(stored);\n return { ...getDefaultConsent(), ...parsed };\n } catch (e) {\n console.error('Failed to parse consent from localStorage', e);\n }\n }\n }\n return { ...getDefaultConsent(), ...initialConsent } as T;\n });\n\n const [hasUserConsented, setHasUserConsented] = useState(() => {\n if (typeof window !== 'undefined') {\n return localStorage.getItem(`${storageKey}-set`) === 'true';\n }\n return false;\n });\n\n const [showBanner, setShowBanner] = useState(!hasUserConsented);\n const [showSettings, setShowSettings] = useState(false);\n\n // Persist consent to localStorage\n useEffect(() => {\n if (typeof window !== 'undefined' && hasUserConsented) {\n localStorage.setItem(storageKey, JSON.stringify(consentState));\n localStorage.setItem(`${storageKey}-set`, 'true');\n }\n }, [consentState, hasUserConsented, storageKey]);\n\n // Notify parent of consent changes\n useEffect(() => {\n if (hasUserConsented && onConsentChange) {\n onConsentChange(consentState);\n }\n }, [consentState, hasUserConsented, onConsentChange]);\n\n const acceptAll = useCallback(() => {\n const newConsent = { ...consentState };\n Object.keys(newConsent).forEach(key => {\n newConsent[key as keyof T] = true as any;\n });\n setConsentState(newConsent);\n setHasUserConsented(true);\n setShowBanner(false);\n setShowSettings(false);\n }, [consentState]);\n\n const rejectAll = useCallback(() => {\n const newConsent = { ...consentState };\n Object.keys(newConsent).forEach(key => {\n if (key !== 'necessary') {\n newConsent[key as keyof T] = false as any;\n }\n });\n setConsentState(newConsent);\n setHasUserConsented(true);\n setShowBanner(false);\n setShowSettings(false);\n }, [consentState]);\n\n const savePreferences = useCallback((preferences: Partial<T>) => {\n setConsentState(prev => ({\n ...prev,\n ...preferences,\n necessary: true, // Always keep necessary as true\n } as T));\n setHasUserConsented(true);\n setShowBanner(false);\n setShowSettings(false);\n }, []);\n\n const updateConsent = useCallback((category: keyof T, value: boolean) => {\n if (category === 'necessary') return; // Can't change necessary cookies\n \n setConsentState(prev => ({\n ...prev,\n [category]: value,\n }));\n }, []);\n\n const openSettings = useCallback(() => {\n setShowSettings(true);\n setShowBanner(false);\n }, []);\n\n const closeSettings = useCallback(() => {\n setShowSettings(false);\n }, []);\n\n const value: ConsentContextValue<T> = {\n hasUserConsented,\n consentState,\n showBanner,\n showSettings,\n acceptAll,\n rejectAll,\n savePreferences,\n openSettings,\n closeSettings,\n updateConsent,\n };\n\n return (\n <ConsentContext.Provider value={value}>\n {children}\n </ConsentContext.Provider>\n );\n }\n\n function useConsent() {\n const context = useContext(ConsentContext);\n if (!context) {\n throw new Error('useConsent must be used within a ConsentProvider');\n }\n return context;\n }\n\n return {\n ConsentContext,\n ConsentProvider,\n useConsent,\n };\n}","import { clsx, type ClassValue } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default:\n \"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60\",\n outline:\n \"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50\",\n secondary:\n \"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80\",\n ghost:\n \"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 px-4 py-2 has-[>svg]:px-3\",\n sm: \"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5\",\n lg: \"h-10 rounded-md px-6 has-[>svg]:px-4\",\n icon: \"size-9\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction Button({\n className,\n variant,\n size,\n asChild = false,\n ...props\n}: React.ComponentProps<\"button\"> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean\n }) {\n const Comp = asChild ? Slot : \"button\"\n\n return (\n <Comp\n data-slot=\"button\"\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n )\n}\n\nexport { Button, buttonVariants }\n","import React, { ReactNode } from 'react';\nimport { useConsent } from '@/contexts/ConsentContext';\nimport { Button } from '@/components/ui/Button';\nimport { cn } from '@/lib/utils';\nimport { BannerProps } from './ConsentManager';\n\nexport interface ConsentBannerProps {\n renderBanner?: (props: BannerProps) => ReactNode;\n theme?: {\n primaryColor?: string;\n textColor?: string;\n backgroundColor?: string;\n };\n position?: 'top' | 'bottom' | 'center';\n animation?: 'slide' | 'fade' | 'none';\n fullWidth?: boolean;\n maxWidth?: string;\n unstyled?: boolean;\n className?: string;\n children?: ReactNode;\n}\n\ninterface ConsentBannerComponent extends React.FC<ConsentBannerProps> {\n Message: React.FC<{ children: ReactNode; className?: string }>;\n Actions: React.FC<{ children: ReactNode; className?: string }>;\n}\n\nconst ConsentBanner: ConsentBannerComponent = ({\n renderBanner,\n theme,\n position = 'bottom',\n animation = 'slide',\n fullWidth = true,\n maxWidth = '1200px',\n unstyled = false,\n className,\n children,\n}) => {\n const { showBanner, acceptAll, rejectAll, openSettings } = useConsent();\n\n if (!showBanner) return null;\n\n // Custom render function\n if (renderBanner) {\n return <>{renderBanner({ onAcceptAll: acceptAll, onRejectAll: rejectAll, onOpenSettings: openSettings })}</>;\n }\n\n // Children-based composition\n if (children) {\n return (\n <div\n className={cn(\n !unstyled && [\n 'fixed z-50 p-4',\n position === 'bottom' && 'bottom-0 left-0 right-0',\n position === 'top' && 'top-0 left-0 right-0',\n position === 'center' && 'top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2',\n animation === 'slide' && 'animate-slide-in',\n animation === 'fade' && 'animate-fade-in',\n ],\n className\n )}\n style={{\n backgroundColor: unstyled ? undefined : theme?.backgroundColor || 'white',\n color: unstyled ? undefined : theme?.textColor,\n maxWidth: fullWidth ? undefined : maxWidth,\n margin: fullWidth ? undefined : '0 auto',\n }}\n >\n {children}\n </div>\n );\n }\n\n // Default implementation\n return (\n <div\n className={cn(\n 'fixed z-50 p-4',\n position === 'bottom' && 'bottom-0 left-0 right-0',\n position === 'top' && 'top-0 left-0 right-0',\n position === 'center' && 'top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2',\n animation === 'slide' && 'animate-slide-in',\n animation === 'fade' && 'animate-fade-in',\n className\n )}\n style={{\n backgroundColor: theme?.backgroundColor || 'white',\n color: theme?.textColor,\n }}\n >\n <div\n className=\"mx-auto\"\n style={{\n maxWidth: fullWidth ? undefined : maxWidth,\n }}\n >\n <div className=\"bg-white rounded-lg shadow-lg p-6\">\n <h3 className=\"text-lg font-semibold mb-2\">Cookie Consent</h3>\n <p className=\"text-gray-600 mb-4\">\n We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies.\n </p>\n <div className=\"flex gap-3 flex-wrap\">\n <Button\n onClick={acceptAll}\n style={{ backgroundColor: theme?.primaryColor }}\n >\n Accept All\n </Button>\n <Button\n onClick={rejectAll}\n variant=\"outline\"\n >\n Reject All\n </Button>\n <Button\n onClick={openSettings}\n variant=\"ghost\"\n >\n Manage Preferences\n </Button>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\n// Sub-components for composition\nConsentBanner.Message = ({ children, className }) => (\n <div className={cn('mb-4', className)}>{children}</div>\n);\n\nConsentBanner.Actions = ({ children, className }) => (\n <div className={cn('flex gap-3 flex-wrap', className)}>{children}</div>\n);\n\nexport { ConsentBanner };","\"use client\"\n\nimport * as React from \"react\"\nimport * as SwitchPrimitive from \"@radix-ui/react-switch\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Switch({\n className,\n ...props\n}: React.ComponentProps<typeof SwitchPrimitive.Root>) {\n return (\n <SwitchPrimitive.Root\n data-slot=\"switch\"\n className={cn(\n \"peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb\n data-slot=\"switch-thumb\"\n className={cn(\n \"bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0\"\n )}\n />\n </SwitchPrimitive.Root>\n )\n}\n\nexport { Switch }\n","import * as React from \"react\"\nimport { cn } from \"@/lib/utils\"\n\ninterface DialogProps {\n open?: boolean\n onOpenChange?: (open: boolean) => void\n children: React.ReactNode\n}\n\nconst Dialog = ({ open, onOpenChange, children }: DialogProps) => {\n if (!open) return null\n\n return (\n <div className=\"fixed inset-0 z-50 flex items-center justify-center\">\n <div \n className=\"fixed inset-0 bg-black/50\" \n onClick={() => onOpenChange?.(false)}\n />\n {children}\n </div>\n )\n}\n\nconst DialogContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & { unstyled?: boolean }\n>(({ className, children, unstyled, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n !unstyled && \"relative z-50 grid w-full max-w-lg gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg\",\n className\n )}\n {...props}\n >\n {children}\n </div>\n))\nDialogContent.displayName = \"DialogContent\"\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n)\nDialogHeader.displayName = \"DialogHeader\"\n\nconst DialogTitle = React.forwardRef<\n HTMLHeadingElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h3\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className\n )}\n {...props}\n />\n))\nDialogTitle.displayName = \"DialogTitle\"\n\nconst DialogDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n))\nDialogDescription.displayName = \"DialogDescription\"\n\nexport {\n Dialog,\n DialogContent,\n DialogHeader,\n DialogTitle,\n DialogDescription,\n}","import React, { ReactNode } from 'react';\nimport { useConsent } from '@/contexts/ConsentContext';\nimport { Button } from '@/components/ui/Button';\nimport { Switch } from '@/components/ui/switch';\nimport { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription } from '@/components/ui/dialog';\nimport { SettingsProps } from './ConsentManager';\n\nexport interface ConsentSettingsProps {\n renderSettings?: (props: SettingsProps) => ReactNode;\n theme?: {\n primaryColor?: string;\n textColor?: string;\n backgroundColor?: string;\n };\n unstyled?: boolean;\n className?: string;\n children?: ReactNode;\n}\n\nconst cookieCategories = [\n {\n id: 'necessary',\n name: 'Necessary Cookies',\n description: 'These cookies are essential for the website to function properly.',\n disabled: true,\n },\n {\n id: 'analytics',\n name: 'Analytics Cookies',\n description: 'These cookies help us understand how visitors interact with our website.',\n disabled: false,\n },\n {\n id: 'marketing',\n name: 'Marketing Cookies',\n description: 'These cookies are used to track visitors across websites for marketing purposes.',\n disabled: false,\n },\n {\n id: 'functional',\n name: 'Functional Cookies',\n description: 'These cookies enable personalized features and functionality.',\n disabled: false,\n },\n];\n\nexport const ConsentSettings: React.FC<ConsentSettingsProps> = ({\n renderSettings,\n theme,\n unstyled = false,\n className,\n children,\n}) => {\n const { showSettings, consentState, updateConsent, savePreferences, closeSettings } = useConsent();\n\n if (!showSettings) return null;\n\n const handleSave = () => {\n savePreferences(consentState);\n };\n\n // Custom render function\n if (renderSettings) {\n return (\n <>\n {renderSettings({\n consentState,\n onUpdateConsent: updateConsent,\n onSave: handleSave,\n onClose: closeSettings,\n })}\n </>\n );\n }\n\n // Children-based composition\n if (children) {\n return (\n <Dialog open={showSettings} onOpenChange={closeSettings}>\n <DialogContent className={className} unstyled={unstyled}>\n {children}\n </DialogContent>\n </Dialog>\n );\n }\n\n // Default implementation\n return (\n <Dialog open={showSettings} onOpenChange={closeSettings}>\n <DialogContent className=\"max-w-2xl\">\n <DialogHeader>\n <DialogTitle>Cookie Preferences</DialogTitle>\n <DialogDescription>\n Manage your cookie preferences. You can enable or disable different categories of cookies below.\n </DialogDescription>\n </DialogHeader>\n \n <div className=\"space-y-6 py-4\">\n {cookieCategories.map((category) => (\n <div key={category.id} className=\"flex items-start justify-between space-x-4\">\n <div className=\"flex-1\">\n <h4 className=\"font-medium mb-1\">{category.name}</h4>\n <p className=\"text-sm text-gray-600\">{category.description}</p>\n </div>\n <Switch\n checked={consentState[category.id as keyof typeof consentState]}\n onCheckedChange={(checked) => updateConsent(category.id as keyof typeof consentState, checked)}\n disabled={category.disabled}\n />\n </div>\n ))}\n </div>\n\n <div className=\"flex justify-end gap-3 pt-4 border-t\">\n <Button variant=\"outline\" onClick={closeSettings}>\n Cancel\n </Button>\n <Button\n onClick={handleSave}\n style={{ backgroundColor: theme?.primaryColor }}\n >\n Save Preferences\n </Button>\n </div>\n </DialogContent>\n </Dialog>\n );\n};","import React, { ReactNode } from 'react';\nimport { ConsentProvider, ConsentProviderProps, ConsentCategories, ConsentActions, useConsent } from '@/contexts/ConsentContext';\nimport { ConsentBanner } from './ConsentBanner';\nimport { ConsentSettings } from './ConsentSettings';\n\nexport interface BannerProps {\n onAcceptAll: () => void;\n onRejectAll: () => void;\n onOpenSettings: () => void;\n}\n\nexport interface SettingsProps {\n consentState: ConsentCategories;\n onUpdateConsent: (category: keyof ConsentCategories, value: boolean) => void;\n onSave: () => void;\n onClose: () => void;\n}\n\nexport interface RenderProps {\n consents: ConsentCategories;\n actions: ConsentActions;\n ui: {\n showBanner: boolean;\n showSettings: boolean;\n openSettings: () => void;\n closeSettings: () => void;\n };\n}\n\nexport interface ConsentManagerProps extends Omit<ConsentProviderProps, 'children'> {\n children?: ReactNode | ((props: RenderProps) => ReactNode);\n headless?: boolean;\n renderBanner?: (props: BannerProps) => ReactNode;\n renderSettings?: (props: SettingsProps) => ReactNode;\n components?: {\n Banner?: React.ComponentType<any>;\n Settings?: React.ComponentType<any>;\n };\n theme?: {\n primaryColor?: string;\n textColor?: string;\n backgroundColor?: string;\n };\n position?: 'top' | 'bottom' | 'center';\n animation?: 'slide' | 'fade' | 'none';\n fullWidth?: boolean;\n maxWidth?: string;\n}\n\ninterface ConsentManagerComponent extends React.FC<ConsentManagerProps> {\n Banner: typeof ConsentBanner;\n Settings: typeof ConsentSettings;\n}\n\n// Internal component that has access to consent context\nconst ConsentManagerInner: React.FC<Omit<ConsentManagerProps, keyof Omit<ConsentProviderProps, 'children'>>> = ({\n children,\n headless = false,\n renderBanner,\n renderSettings,\n components,\n theme,\n position = 'bottom',\n animation = 'slide',\n fullWidth = true,\n maxWidth = '1200px',\n}) => {\n const consent = useConsent();\n\n // If using render props pattern\n if (typeof children === 'function') {\n const renderProps: RenderProps = {\n consents: consent.consentState,\n actions: {\n acceptAll: consent.acceptAll,\n rejectAll: consent.rejectAll,\n savePreferences: consent.savePreferences,\n updateConsent: consent.updateConsent,\n openSettings: consent.openSettings,\n closeSettings: consent.closeSettings,\n },\n ui: {\n showBanner: consent.showBanner,\n showSettings: consent.showSettings,\n openSettings: consent.openSettings,\n closeSettings: consent.closeSettings,\n },\n };\n return <>{children(renderProps)}</>;\n }\n\n return (\n <>\n {children}\n {!headless && (\n <>\n {components?.Banner ? (\n <components.Banner />\n ) : (\n <ConsentBanner\n renderBanner={renderBanner}\n theme={theme}\n position={position}\n animation={animation}\n fullWidth={fullWidth}\n maxWidth={maxWidth}\n />\n )}\n {components?.Settings ? (\n <components.Settings />\n ) : (\n <ConsentSettings\n renderSettings={renderSettings}\n theme={theme}\n />\n )}\n </>\n )}\n </>\n );\n};\n\nconst ConsentManager: ConsentManagerComponent = ({\n children,\n initialConsent,\n onConsentChange,\n storageKey,\n ...innerProps\n}) => {\n return (\n <ConsentProvider\n initialConsent={initialConsent}\n onConsentChange={onConsentChange}\n storageKey={storageKey}\n >\n <ConsentManagerInner {...innerProps}>\n {children}\n </ConsentManagerInner>\n </ConsentProvider>\n );\n};\n\n// Attach sub-components for composition\nConsentManager.Banner = ConsentBanner;\nConsentManager.Settings = ConsentSettings;\n\nexport { ConsentManager };","import React, { ReactNode } from 'react';\nimport { useConsent } from '@/contexts/ConsentContext';\n\nexport interface UnstyledConsentBannerProps {\n className?: string;\n children?: ReactNode;\n}\n\nexport const UnstyledConsentBanner: React.FC<UnstyledConsentBannerProps> = ({\n className,\n children,\n}) => {\n const { showBanner, acceptAll, rejectAll, openSettings } = useConsent();\n\n if (!showBanner) return null;\n\n return (\n <div className={className} role=\"region\" aria-label=\"Cookie consent\">\n {children || (\n <>\n <div>\n <h3>Cookie Consent</h3>\n <p>We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies.</p>\n </div>\n <div>\n <button onClick={acceptAll} aria-label=\"Accept all cookies\">\n Accept All\n </button>\n <button onClick={rejectAll} aria-label=\"Reject non-essential cookies\">\n Reject All\n </button>\n <button onClick={openSettings} aria-label=\"Manage cookie preferences\">\n Manage Preferences\n </button>\n </div>\n </>\n )}\n </div>\n );\n};","import React, { ReactNode } from 'react';\nimport { useConsent } from '@/contexts/ConsentContext';\n\nexport interface UnstyledConsentSettingsProps {\n className?: string;\n children?: ReactNode;\n}\n\nconst cookieCategories = [\n {\n id: 'necessary',\n name: 'Necessary Cookies',\n description: 'These cookies are essential for the website to function properly.',\n disabled: true,\n },\n {\n id: 'analytics',\n name: 'Analytics Cookies',\n description: 'These cookies help us understand how visitors interact with our website.',\n disabled: false,\n },\n {\n id: 'marketing',\n name: 'Marketing Cookies',\n description: 'These cookies are used to track visitors across websites for marketing purposes.',\n disabled: false,\n },\n {\n id: 'functional',\n name: 'Functional Cookies',\n description: 'These cookies enable personalized features and functionality.',\n disabled: false,\n },\n];\n\nexport const UnstyledConsentSettings: React.FC<UnstyledConsentSettingsProps> = ({\n className,\n children,\n}) => {\n const { showSettings, consentState, updateConsent, savePreferences, closeSettings } = useConsent();\n\n if (!showSettings) return null;\n\n const handleSave = () => {\n savePreferences(consentState);\n };\n\n return (\n <div className={className} role=\"dialog\" aria-label=\"Cookie preferences\">\n {children || (\n <>\n <div>\n <h2>Cookie Preferences</h2>\n <p>Manage your cookie preferences. You can enable or disable different categories of cookies below.</p>\n </div>\n \n <div>\n {cookieCategories.map((category) => (\n <div key={category.id}>\n <div>\n <h4>{category.name}</h4>\n <p>{category.description}</p>\n </div>\n <input\n type=\"checkbox\"\n checked={consentState[category.id as keyof typeof consentState]}\n onChange={(e) => updateConsent(category.id as keyof typeof consentState, e.target.checked)}\n disabled={category.disabled}\n aria-label={`Toggle ${category.name}`}\n />\n </div>\n ))}\n </div>\n\n <div>\n <button onClick={closeSettings} aria-label=\"Cancel changes\">\n Cancel\n </button>\n <button onClick={handleSave} aria-label=\"Save cookie preferences\">\n Save Preferences\n </button>\n </div>\n </>\n )}\n </div>\n );\n};","import React from 'react';\nimport { useConsent } from '@/contexts/ConsentContext';\n\nexport interface UnstyledConsentToggleProps {\n category: 'analytics' | 'marketing' | 'functional';\n className?: string;\n label?: string;\n}\n\nexport const UnstyledConsentToggle: React.FC<UnstyledConsentToggleProps> = ({\n category,\n className,\n label,\n}) => {\n const { consentState, updateConsent } = useConsent();\n\n return (\n <label className={className}>\n <input\n type=\"checkbox\"\n checked={consentState[category]}\n onChange={(e) => updateConsent(category, e.target.checked)}\n aria-label={label || `Toggle ${category} cookies`}\n />\n {label && <span>{label}</span>}\n </label>\n );\n};","import { useConsent } from '@/contexts/ConsentContext';\n\n/**\n * Hook to access only the consent state without actions\n */\nexport function useConsentState() {\n const { hasUserConsented, consentState, showBanner, showSettings } = useConsent();\n \n return {\n hasUserConsented,\n consentState,\n showBanner,\n showSettings,\n };\n}","import { useConsent } from '@/contexts/ConsentContext';\n\n/**\n * Hook to access only the consent actions without state\n */\nexport function useConsentActions() {\n const {\n acceptAll,\n rejectAll,\n savePreferences,\n openSettings,\n closeSettings,\n updateConsent,\n } = useConsent();\n \n return {\n acceptAll,\n rejectAll,\n savePreferences,\n openSettings,\n closeSettings,\n updateConsent,\n };\n}","import { useEffect, useRef, useCallback } from 'react';\nimport { useConsent } from '@/contexts/ConsentContext';\nimport { ConsentCategories } from '@/contexts/ConsentContext';\n\ntype ConsentEventType = \n | 'consent:accepted'\n | 'consent:rejected'\n | 'consent:updated'\n | 'banner:shown'\n | 'banner:hidden'\n | 'settings:opened'\n | 'settings:closed';\n\ntype ConsentEventListener = (data?: any) => void;\n\ninterface ConsentEventManager {\n on: (event: ConsentEventType, listener: ConsentEventListener) => () => void;\n off: (event: ConsentEventType, listener: ConsentEventListener) => void;\n emit: (event: ConsentEventType, data?: any) => void;\n}\n\n/**\n * Advanced hook that provides event-driven consent management\n */\nexport function useConsentManager(): ConsentEventManager & ReturnType<typeof useConsent> {\n const consent = useConsent();\n const listenersRef = useRef<Map<ConsentEventType, Set<ConsentEventListener>>>(new Map());\n const previousStateRef = useRef({\n hasUserConsented: consent.hasUserConsented,\n showBanner: consent.showBanner,\n showSettings: consent.showSettings,\n consentState: consent.consentState,\n });\n\n // Event emitter implementation\n const emit = useCallback((event: ConsentEventType, data?: any) => {\n const listeners = listenersRef.current.get(event);\n if (listeners) {\n listeners.forEach(listener => listener(data));\n }\n }, []);\n\n const on = useCallback((event: ConsentEventType, listener: ConsentEventListener) => {\n if (!listenersRef.current.has(event)) {\n listenersRef.current.set(event, new Set());\n }\n listenersRef.current.get(event)!.add(listener);\n\n // Return unsubscribe function\n return () => {\n const listeners = listenersRef.current.get(event);\n if (listeners) {\n listeners.delete(listener);\n }\n };\n }, []);\n\n const off = useCallback((event: ConsentEventType, listener: ConsentEventListener) => {\n const listeners = listenersRef.current.get(event);\n if (listeners) {\n listeners.delete(listener);\n }\n }, []);\n\n // Track state changes and emit events\n useEffect(() => {\n const prev = previousStateRef.current;\n \n // Check for consent acceptance\n if (!prev.hasUserConsented && consent.hasUserConsented) {\n const allAccepted = Object.entries(consent.consentState)\n .filter(([key]) => key !== 'necessary')\n .every(([, value]) => value);\n \n if (allAccepted) {\n emit('consent:accepted', consent.consentState);\n } else {\n emit('consent:rejected', consent.consentState);\n }\n }\n\n // Check for consent updates\n if (prev.hasUserConsented && consent.hasUserConsented && \n JSON.stringify(prev.consentState) !== JSON.stringify(consent.consentState)) {\n emit('consent:updated', consent.consentState);\n }\n\n // Check for banner visibility changes\n if (!prev.showBanner && consent.showBanner) {\n emit('banner:shown');\n } else if (prev.showBanner && !consent.showBanner) {\n emit('banner:hidden');\n }\n\n // Check for settings visibility changes\n if (!prev.showSettings && consent.showSettings) {\n emit('settings:opened');\n } else if (prev.showSettings && !consent.showSettings) {\n emit('settings:closed');\n }\n\n // Update previous state\n previousStateRef.current = {\n hasUserConsented: consent.hasUserConsented,\n showBanner: consent.showBanner,\n showSettings: consent.showSettings,\n consentState: { ...consent.consentState },\n };\n }, [consent, emit]);\n\n return {\n ...consent,\n on,\n off,\n emit,\n };\n}","'use client';\n\nimport { ConsentRecord, ConsentType, ConsentHistoryEntry } from '@/types';\nimport { v4 as uuidv4 } from 'uuid';\n\n// In a real implementation, this would connect to a database\n// For demo purposes, we're using localStorage\n\nconst CONSENT_STORAGE_KEY = 'ndpr_consent_records';\nconst CONSENT_HISTORY_KEY = 'ndpr_consent_history';\n\n// Helper function to get consent history\nconst getConsentHistoryHelper = (): ConsentHistoryEntry[] => {\n if (typeof window === 'undefined') return [];\n \n const storedHistory = localStorage.getItem(CONSENT_HISTORY_KEY);\n if (!storedHistory) return [];\n \n try {\n return JSON.parse(storedHistory) as ConsentHistoryEntry[];\n } catch (error) {\n console.error('Error parsing consent history:', error);\n return [];\n }\n};\n\nexport const consentService = {\n // Save a new consent record\n saveConsent: (consents: Record<ConsentType, boolean>, userId?: string): ConsentRecord => {\n const consentRecord: ConsentRecord = {\n id: uuidv4(),\n userId,\n consents,\n timestamp: new Date().toISOString(),\n ipAddress: 'Collected server-side in real implementation',\n userAgent: typeof window !== 'undefined' ? window.navigator.userAgent : 'Unknown',\n };\n\n // Store in localStorage for demo\n if (typeof window !== 'undefined') {\n // Save as current consent\n localStorage.setItem(CONSENT_STORAGE_KEY, JSON.stringify(consentRecord));\n \n // Add to history\n const history = getConsentHistoryHelper();\n history.push(consentRecord);\n localStorage.setItem(CONSENT_HISTORY_KEY, JSON.stringify(history));\n }\n\n return consentRecord;\n },\n\n // Get the current consent record\n getCurrentConsent: (): ConsentRecord | null => {\n if (typeof window === 'undefined') return null;\n \n const storedConsent = localStorage.getItem(CONSENT_STORAGE_KEY);\n if (!storedConsent) return null;\n \n try {\n return JSON.parse(storedConsent) as ConsentRecord;\n } catch (error) {\n console.error('Error parsing consent record:', error);\n return null;\n }\n },\n\n // Get consent history\n getConsentHistory: (): ConsentHistoryEntry[] => {\n return getConsentHistoryHelper();\n },\n\n // Update consent with change reason\n updateConsent: (\n consents: Record<ConsentType, boolean>, \n changeReason?: string,\n userId?: string\n ): ConsentRecord => {\n const consentRecord: ConsentHistoryEntry = {\n id: uuidv4(),\n userId,\n consents,\n timestamp: new Date().toISOString(),\n ipAddress: 'Collected server-side in real implementation',\n userAgent: typeof window !== 'undefined' ? window.navigator.userAgent : 'Unknown',\n changeReason\n };\n\n // Store in localStorage for demo\n if (typeof window !== 'undefined') {\n // Save as current consent\n localStorage.setItem(CONSENT_STORAGE_KEY, JSON.stringify(consentRecord));\n \n // Add to history\n const history = getConsentHistoryHelper();\n history.push(consentRecord);\n localStorage.setItem(CONSENT_HISTORY_KEY, JSON.stringify(history));\n }\n\n return consentRecord;\n },\n\n // Clear all consent data (for testing/development)\n clearConsentData: (): void => {\n if (typeof window === 'undefined') return;\n \n localStorage.removeItem(CONSENT_STORAGE_KEY);\n localStorage.removeItem(CONSENT_HISTORY_KEY);\n },\n\n // Check if a specific consent is granted\n hasConsent: (type: ConsentType): boolean => {\n const current = consentService.getCurrentConsent();\n if (!current) return false;\n return current.consents[type] === true;\n }\n};\n\nexport default consentService;\n","// Core exports\nexport { ConsentProvider, useConsent, ConsentContext } from './contexts/ConsentContext';\nexport type { ConsentCategories, ConsentState, ConsentActions, ConsentContextValue } from './contexts/ConsentContext';\n\n// Generic consent context factory\nexport { createConsentContext } from './contexts/GenericConsentContext';\nexport type {\n BaseConsentCategories,\n DefaultConsentCategories,\n ConsentProviderProps,\n} from './types/consent';\n\n// Components\nexport { ConsentManager } from './components/consent/ConsentManager';\nexport { ConsentBanner } from './components/consent/ConsentBanner';\nexport { ConsentSettings } from './components/consent/ConsentSettings';\nexport type { ConsentManagerProps, BannerProps, SettingsProps, RenderProps } from './components/consent/ConsentManager';\n\n// Unstyled components\nexport {\n UnstyledConsentBanner,\n UnstyledConsentSettings,\n UnstyledConsentToggle,\n} from './components/consent/unstyled';\n\n// Hooks\nexport { useConsentState } from './hooks/useConsentState';\nexport { useConsentActions } from './hooks/useConsentActions';\nexport { useConsentManager } from './hooks/useConsentManager';\n\n// Utilities\nexport { consentService } from './lib/consentService';\n\n// Cookie utilities\nexport const cookieUtils = {\n set: (name: string, value: string, days: number) => {\n if (typeof window === 'undefined') return;\n const date = new Date();\n date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));\n const expires = `expires=${date.toUTCString()}`;\n document.cookie = `${name}=${value};${expires};path=/`;\n },\n get: (name: string): string | null => {\n if (typeof window === 'undefined') return null;\n const nameEQ = `${name}=`;\n const ca = document.cookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) === ' ') c = c.substring(1, c.length);\n if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);\n }\n return null;\n },\n delete: (name: string) => {\n if (typeof window === 'undefined') return;\n document.cookie = `${name}=;expires=Thu, 01 Jan 1970 00:00:00 UTC;path=/;`;\n }\n};\n\n// Consent storage utilities\nexport const consentStorage = {\n save: (key: string, data: any) => {\n if (typeof window === 'undefined') return;\n localStorage.setItem(key, JSON.stringify(data));\n },\n load: (key: string): any | null => {\n if (typeof window === 'undefined') return null;\n const data = localStorage.getItem(key);\n return data ? JSON.parse(data) : null;\n },\n remove: (key: string) => {\n if (typeof window === 'undefined') return;\n localStorage.removeItem(key);\n }\n};"]}
|
|
1
|
+
{"version":3,"sources":["../src/contexts/ConsentContext.tsx","../src/contexts/GenericConsentContext.tsx","../src/lib/utils.ts","../src/components/ui/Button.tsx","../src/components/consent/ConsentBanner.tsx","../src/components/ui/switch.tsx","../src/components/ui/dialog.tsx","../src/components/consent/ConsentSettings.tsx","../src/components/consent/ConsentManager.tsx","../src/components/consent/unstyled/UnstyledConsentBanner.tsx","../src/components/consent/unstyled/UnstyledConsentSettings.tsx","../src/components/consent/unstyled/UnstyledConsentToggle.tsx","../src/hooks/useConsentState.ts","../src/hooks/useConsentActions.ts","../src/hooks/useConsentManager.ts","../src/lib/storage.ts","../src/lib/consentService.ts","../src/components/ui/Input.tsx","../src/components/ui/TextArea.tsx","../src/components/ui/FormField.tsx","../src/components/ui/Checkbox.tsx","../src/components/breach-notification/BreachNotificationForm.tsx","../src/components/ui/Card.tsx","../src/components/ui/Badge.tsx","../src/components/dpia/DPIAQuestionnaire.tsx","../src/components/ui/Loading.tsx","../src/components/data-subject-rights/DataSubjectRequestForm.tsx","../src/components/privacy-policy/steps/OrganizationInfoStep.tsx","../src/components/privacy-policy/shared/CheckboxGroup.tsx","../src/components/privacy-policy/shared/FormField.tsx","../src/components/ui/Select.tsx","../src/components/privacy-policy/steps/DataCollectionStep.tsx","../src/components/privacy-policy/shared/CheckboxField.tsx","../src/components/privacy-policy/steps/DataSharingStep.tsx","../src/components/privacy-policy/steps/CustomSectionsStep.tsx","../src/components/privacy-policy/steps/PolicyPreviewStep.tsx","../src/components/privacy-policy/shared/StepIndicator.tsx","../src/components/privacy-policy/data.ts","../src/components/privacy-policy/PolicyGenerator.tsx","../src/index.ts"],"names":["ConsentContext","createContext","defaultConsent","ConsentProvider","children","initialConsent","onConsentChange","storageKey","consentState","setConsentState","useState","stored","parsed","__spreadValues","e","hasUserConsented","setHasUserConsented","showBanner","setShowBanner","showSettings","setShowSettings","useEffect","acceptAll","useCallback","rejectAll","savePreferences","preferences","prev","__spreadProps","updateConsent","category","value","openSettings","closeSettings","React","useConsent","context","useContext","createConsentContext","categories","getDefaultConsent","cat","key","newConsent","cn","inputs","twMerge","clsx","buttonVariants","cva","Button","_a","_b","className","variant","size","asChild","props","__objRest","bt","Slot","ConsentBanner","renderBanner","theme","position","animation","fullWidth","maxWidth","unstyled","Message","Actions","Switch","Ye","Fe","Dialog","open","onOpenChange","ue","DialogContent","ref","DialogHeader","DialogTitle","DialogDescription","cookieCategories","ConsentSettings","renderSettings","handleSave","checked","ConsentManagerInner","headless","components","consent","renderProps","ConsentManager","innerProps","UnstyledConsentBanner","UnstyledConsentSettings","UnstyledConsentToggle","label","useConsentState","useConsentActions","useConsentManager","listenersRef","useRef","previousStateRef","emit","event","data","listeners","listener","on","off","allAccepted","SafeStorage","testKey","defaultValue","item","error","serialized","daysOld","cutoffTime","keysToRemove","wrappedData","maxAge","wrapped","storage","CONSENT_STORAGE_KEY","CONSENT_HISTORY_KEY","getConsentHistoryHelper","consentService","consents","userId","consentRecord","uuidv4","historyEntry","history","changeReason","previousConsent","action","v","clearedCurrent","clearedHistory","type","current","Input","He","TextArea","FormField","id","description","required","Checkbox","generatedId","BreachNotificationForm","onSubmit","formData","setFormData","errors","setErrors","isSubmitting","setIsSubmitting","newMitigationStep","setNewMitigationStep","newDataCategory","setNewDataCategory","defaultDataCategories","handleChange","name","newErrors","handleDataCategoryToggle","updatedCategories","c","handleAddDataCategory","handleAddMitigationStep","handleRemoveMitigationStep","index","_","i","handleKeyPress","validateForm","handleSubmit","__async","resolve","step","Card","Se","CardHeader","CardTitle","CardDescription","CardContent","badgeVariants","Badge","DPIAQuestionnaire","questions","projectName","setProjectName","projectDescription","setProjectDescription","dataController","setDataController","assessmentDate","setAssessmentDate","answers","setAnswers","currentStep","setCurrentStep","progress","setProgress","categoryNames","handleAnswerChange","questionId","renderQuestionInput","question","_c","option","getRiskLevelIndicator","currentValues","totalQuestions","answeredQuestions","projectInfoComplete","calculatedProgress","validateStep","handleNext","handleBack","renderStepContent","categoryQuestions","getCategoryDescription","variants","labels","totalSteps","q","LoadingSpinner","LoadingButton","loading","loadingText","disabled","getRequestTypeIcon","requestType","DataSubjectRequestForm","requestTypeOptions","completionPercentage","setCompletionPercentage","filledFields","totalFields","OrganizationInfoStep","onChange","CheckboxGroup","title","items","selectedItems","onToggleItem","columns","isSelected","itemId","hasError","Select","DataCollectionStep","defaultDataPurposes","defaultSecurityMeasures","dataSubjectCategories","legalBasisOptions","dataCategories","CheckboxField","DataSharingStep","onAddThirdParty","onRemoveThirdParty","defaultCookieTypes","commonTransferCountries","trackingTechnologies","transferSafeguards","thirdPartyInputRef","thirdPartyCategories","thirdPartyPurposes","regulatoryComplianceOptions","party","CustomSectionsStep","onAddCustomSection","onRemoveCustomSection","titleInputRef","contentInputRef","selectedTemplate","setSelectedTemplate","showTemplateContent","setShowTemplateContent","templateSections","filteredTemplateSections","template","handleAddTemplateSection","t","handleAddCustomSection","section","PolicyPreviewStep","previewRef","purpose","country","measure","StepIndicator","stepLabels","stepNumber","isActive","isCompleted","isPending","PolicyGenerator","onGenerate","setStep","handleMultiSelect","currentItems","handleAddThirdParty","thirdPartyInput","handleRemoveThirdParty","content","handleRemoveCustomSection","_step","handleGenerate","sections","order","getIndustrySpecificDataExample","subject","getIndustrySpecificPurposeExample","basis","thirdPartyContent","cookieContent","tech","transferContent","safeguard","securityContent","rightsContent","reg","industry","cookieUtils","days","date","expires","nameEQ","ca","consentStorage","ConsentStorage"],"mappings":"w+CA4BA,IAAMA,EAAAA,CAAiBC,eAAAA,CAA+C,MAAS,CAAA,CASzEC,EAAAA,CAAoC,CACxC,SAAA,CAAW,IAAA,CACX,SAAA,CAAW,KAAA,CACX,SAAA,CAAW,KAAA,CACX,UAAA,CAAY,KACd,EAEO,SAASC,EAAAA,CAAgB,CAC9B,QAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CAAiB,EAAC,CAClB,eAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CAAa,cACf,CAAA,CAAyB,CACvB,GAAM,CAACC,CAAAA,CAAcC,CAAe,CAAA,CAAIC,UAAAA,CAA4B,IAAM,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CAC5B,IAAA,CAAM,CAACrS,CAAAA,CAAaiE,CAAAA,GAAkB,CAChC,OAAO,MAAA,EAAW,WAAA,EACtB,YAAA,CAAa,OAAA,CAAQjE,CAAAA,CAAK,IAAA,CAAK,SAAA,CAAUiE,CAAI,CAAC,EAChD,CAAA,CACA,IAAA,CAAoBjE,CAAAA,EAA0B,CAC5C,GAAI,OAAO,MAAA,EAAW,WAAA,CAAa,OAAO,IAAA,CAC1C,IAAMiE,CAAAA,CAAO,YAAA,CAAa,OAAA,CAAQjE,CAAG,CAAA,CACrC,OAAOiE,CAAAA,CAAQ,IAAA,CAAK,KAAA,CAAMA,CAAI,CAAA,CAAU,IAC1C,CAAA,CACA,MAAA,CAASjE,CAAAA,EAAgB,CACnB,OAAO,MAAA,EAAW,WAAA,EACtB,YAAA,CAAa,UAAA,CAAWA,CAAG,EAC7B,CACF,EA2CasS,EAAAA,CAAiBD","file":"index.js","sourcesContent":["import React, { createContext, useContext, useState, useCallback, useEffect, ReactNode } from 'react';\n\nexport interface ConsentCategories {\n necessary: boolean;\n analytics: boolean;\n marketing: boolean;\n functional: boolean;\n [key: string]: boolean;\n}\n\nexport interface ConsentState {\n hasUserConsented: boolean;\n consentState: ConsentCategories;\n showBanner: boolean;\n showSettings: boolean;\n}\n\nexport interface ConsentActions {\n acceptAll: () => void;\n rejectAll: () => void;\n savePreferences: (preferences: Partial<ConsentCategories>) => void;\n openSettings: () => void;\n closeSettings: () => void;\n updateConsent: (category: keyof ConsentCategories, value: boolean) => void;\n}\n\nexport interface ConsentContextValue extends ConsentState, ConsentActions {}\n\nconst ConsentContext = createContext<ConsentContextValue | undefined>(undefined);\n\nexport interface ConsentProviderProps {\n children: ReactNode;\n initialConsent?: Partial<ConsentCategories>;\n onConsentChange?: (consent: ConsentCategories) => void;\n storageKey?: string;\n}\n\nconst defaultConsent: ConsentCategories = {\n necessary: true, // Always true\n analytics: false,\n marketing: false,\n functional: false,\n};\n\nexport function ConsentProvider({\n children,\n initialConsent = {},\n onConsentChange,\n storageKey = 'ndpr-consent',\n}: ConsentProviderProps) {\n const [consentState, setConsentState] = useState<ConsentCategories>(() => {\n // Try to load from localStorage\n if (typeof window !== 'undefined') {\n const stored = localStorage.getItem(storageKey);\n if (stored) {\n try {\n const parsed = JSON.parse(stored);\n return { ...defaultConsent, ...parsed };\n } catch (e) {\n console.error('Failed to parse consent from localStorage', e);\n }\n }\n }\n return { ...defaultConsent, ...initialConsent };\n });\n\n const [hasUserConsented, setHasUserConsented] = useState(() => {\n if (typeof window !== 'undefined') {\n return localStorage.getItem(`${storageKey}-set`) === 'true';\n }\n return false;\n });\n\n const [showBanner, setShowBanner] = useState(!hasUserConsented);\n const [showSettings, setShowSettings] = useState(false);\n\n // Persist consent to localStorage\n useEffect(() => {\n if (typeof window !== 'undefined' && hasUserConsented) {\n localStorage.setItem(storageKey, JSON.stringify(consentState));\n localStorage.setItem(`${storageKey}-set`, 'true');\n }\n }, [consentState, hasUserConsented, storageKey]);\n\n // Notify parent of consent changes\n useEffect(() => {\n if (hasUserConsented && onConsentChange) {\n onConsentChange(consentState);\n }\n }, [consentState, hasUserConsented, onConsentChange]);\n\n const acceptAll = useCallback(() => {\n const newConsent: ConsentCategories = {\n necessary: true,\n analytics: true,\n marketing: true,\n functional: true,\n };\n setConsentState(newConsent);\n setHasUserConsented(true);\n setShowBanner(false);\n setShowSettings(false);\n }, []);\n\n const rejectAll = useCallback(() => {\n const newConsent: ConsentCategories = {\n necessary: true,\n analytics: false,\n marketing: false,\n functional: false,\n };\n setConsentState(newConsent);\n setHasUserConsented(true);\n setShowBanner(false);\n setShowSettings(false);\n }, []);\n\n const savePreferences = useCallback((preferences: Partial<ConsentCategories>) => {\n setConsentState(prev => ({\n ...prev,\n ...preferences,\n necessary: true, // Always keep necessary as true\n }));\n setHasUserConsented(true);\n setShowBanner(false);\n setShowSettings(false);\n }, []);\n\n const updateConsent = useCallback((category: keyof ConsentCategories, value: boolean) => {\n if (category === 'necessary') return; // Can't change necessary cookies\n \n setConsentState(prev => ({\n ...prev,\n [category]: value,\n }));\n }, []);\n\n const openSettings = useCallback(() => {\n setShowSettings(true);\n setShowBanner(false);\n }, []);\n\n const closeSettings = useCallback(() => {\n setShowSettings(false);\n }, []);\n\n const value: ConsentContextValue = {\n hasUserConsented,\n consentState,\n showBanner,\n showSettings,\n acceptAll,\n rejectAll,\n savePreferences,\n openSettings,\n closeSettings,\n updateConsent,\n };\n\n return (\n <ConsentContext.Provider value={value}>\n {children}\n </ConsentContext.Provider>\n );\n}\n\nexport function useConsent() {\n const context = useContext(ConsentContext);\n if (!context) {\n throw new Error('useConsent must be used within a ConsentProvider');\n }\n return context;\n}\n\n// Export for external use\nexport { ConsentContext };","import React, {\n createContext,\n useContext,\n useState,\n useCallback,\n useEffect,\n} from \"react\";\nimport {\n BaseConsentCategories,\n DefaultConsentCategories,\n ConsentContextValue,\n ConsentProviderProps,\n} from \"@/types/consent\";\n\n/**\n * Factory function to create a typed consent context\n */\nexport function createConsentContext<\n T extends BaseConsentCategories = DefaultConsentCategories,\n>() {\n const ConsentContext = createContext<ConsentContextValue<T> | undefined>(\n undefined,\n );\n\n function ConsentProvider({\n children,\n initialConsent = {} as Partial<T>,\n onConsentChange,\n storageKey = \"ndpr-consent\",\n categories,\n }: ConsentProviderProps<T>) {\n const getDefaultConsent = (): T => {\n const defaultConsent: Record<string, boolean> = { necessary: true };\n\n if (categories) {\n categories.forEach((cat) => {\n if (cat.id !== \"necessary\") {\n const key = cat.id as string;\n (defaultConsent as any)[key] = false;\n }\n });\n } else {\n // Use default categories\n defaultConsent.analytics = false;\n defaultConsent.marketing = false;\n defaultConsent.functional = false;\n }\n\n return defaultConsent as T;\n };\n\n const [consentState, setConsentState] = useState<T>(() => {\n // Try to load from localStorage\n if (typeof window !== \"undefined\") {\n const stored = localStorage.getItem(storageKey);\n if (stored) {\n try {\n const parsed = JSON.parse(stored);\n return { ...getDefaultConsent(), ...parsed };\n } catch (e) {\n console.error(\"Failed to parse consent from localStorage\", e);\n }\n }\n }\n return { ...getDefaultConsent(), ...initialConsent } as T;\n });\n\n const [hasUserConsented, setHasUserConsented] = useState(() => {\n if (typeof window !== \"undefined\") {\n return localStorage.getItem(`${storageKey}-set`) === \"true\";\n }\n return false;\n });\n\n const [showBanner, setShowBanner] = useState(!hasUserConsented);\n const [showSettings, setShowSettings] = useState(false);\n\n // Persist consent to localStorage\n useEffect(() => {\n if (typeof window !== \"undefined\" && hasUserConsented) {\n localStorage.setItem(storageKey, JSON.stringify(consentState));\n localStorage.setItem(`${storageKey}-set`, \"true\");\n }\n }, [consentState, hasUserConsented, storageKey]);\n\n // Notify parent of consent changes\n useEffect(() => {\n if (hasUserConsented && onConsentChange) {\n onConsentChange(consentState);\n }\n }, [consentState, hasUserConsented, onConsentChange]);\n\n const acceptAll = useCallback(() => {\n const newConsent = { ...consentState };\n Object.keys(newConsent).forEach((key) => {\n (newConsent as Record<string, boolean>)[key] = true;\n });\n setConsentState(newConsent);\n setHasUserConsented(true);\n setShowBanner(false);\n setShowSettings(false);\n }, [consentState]);\n\n const rejectAll = useCallback(() => {\n const newConsent = { ...consentState };\n Object.keys(newConsent).forEach((key) => {\n if (key !== \"necessary\") {\n (newConsent as Record<string, boolean>)[key] = false;\n }\n });\n setConsentState(newConsent);\n setHasUserConsented(true);\n setShowBanner(false);\n setShowSettings(false);\n }, [consentState]);\n\n const savePreferences = useCallback((preferences: Partial<T>) => {\n setConsentState(\n (prev) =>\n ({\n ...prev,\n ...preferences,\n necessary: true, // Always keep necessary as true\n }) as T,\n );\n setHasUserConsented(true);\n setShowBanner(false);\n setShowSettings(false);\n }, []);\n\n const updateConsent = useCallback((category: keyof T, value: boolean) => {\n if (category === \"necessary\") return; // Can't change necessary cookies\n\n setConsentState((prev) => ({\n ...prev,\n [category]: value,\n }));\n }, []);\n\n const openSettings = useCallback(() => {\n setShowSettings(true);\n setShowBanner(false);\n }, []);\n\n const closeSettings = useCallback(() => {\n setShowSettings(false);\n }, []);\n\n const value: ConsentContextValue<T> = {\n hasUserConsented,\n consentState,\n showBanner,\n showSettings,\n acceptAll,\n rejectAll,\n savePreferences,\n openSettings,\n closeSettings,\n updateConsent,\n };\n\n return (\n <ConsentContext.Provider value={value}>\n {children}\n </ConsentContext.Provider>\n );\n }\n\n function useConsent() {\n const context = useContext(ConsentContext);\n if (!context) {\n throw new Error(\"useConsent must be used within a ConsentProvider\");\n }\n return context;\n }\n\n return {\n ConsentContext,\n ConsentProvider,\n useConsent,\n };\n}\n","import { clsx, type ClassValue } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default:\n \"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60\",\n outline:\n \"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50\",\n secondary:\n \"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80\",\n ghost:\n \"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 px-4 py-2 has-[>svg]:px-3\",\n sm: \"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5\",\n lg: \"h-10 rounded-md px-6 has-[>svg]:px-4\",\n icon: \"size-9\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction Button({\n className,\n variant,\n size,\n asChild = false,\n ...props\n}: React.ComponentProps<\"button\"> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean\n }) {\n const Comp = asChild ? Slot : \"button\"\n\n return (\n <Comp\n data-slot=\"button\"\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n )\n}\n\nexport { Button, buttonVariants }\n","\"use client\";\nimport React, { ReactNode } from \"react\";\nimport { useConsent } from \"@/contexts/ConsentContext\";\nimport { Button } from \"@/components/ui/Button\";\nimport { cn } from \"@/lib/utils\";\nimport { BannerProps } from \"./ConsentManager\";\n\nexport interface ConsentBannerProps {\n renderBanner?: (props: BannerProps) => ReactNode;\n theme?: {\n primaryColor?: string;\n textColor?: string;\n backgroundColor?: string;\n };\n position?: \"top\" | \"bottom\" | \"center\";\n animation?: \"slide\" | \"fade\" | \"none\";\n fullWidth?: boolean;\n maxWidth?: string;\n unstyled?: boolean;\n className?: string;\n children?: ReactNode;\n}\ninterface ConsentBannerComponent extends React.FC<ConsentBannerProps> {\n Message: React.FC<{ children: ReactNode; className?: string }>;\n Actions: React.FC<{ children: ReactNode; className?: string }>;\n}\n\nconst ConsentBanner: ConsentBannerComponent = ({\n renderBanner,\n theme,\n position = \"bottom\",\n animation = \"slide\",\n fullWidth = true,\n maxWidth = \"1200px\",\n unstyled = false,\n className,\n children,\n}) => {\n const { showBanner, acceptAll, rejectAll, openSettings } = useConsent();\n\n if (!showBanner) return null;\n\n // Custom render function\n if (renderBanner) {\n return (\n <>\n {renderBanner({\n onAcceptAll: acceptAll,\n onRejectAll: rejectAll,\n onOpenSettings: openSettings,\n })}\n </>\n );\n }\n\n // Children-based composition\n if (children) {\n return (\n <div\n className={cn(\n !unstyled && [\n \"fixed z-50 p-4\",\n position === \"bottom\" && \"bottom-0 left-0 right-0\",\n position === \"top\" && \"top-0 left-0 right-0\",\n position === \"center\" &&\n \"top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2\",\n animation === \"slide\" && \"animate-slide-in\",\n animation === \"fade\" && \"animate-fade-in\",\n ],\n className,\n )}\n style={{\n backgroundColor: unstyled\n ? undefined\n : theme?.backgroundColor || \"white\",\n color: unstyled ? undefined : theme?.textColor,\n maxWidth: fullWidth ? undefined : maxWidth,\n margin: fullWidth ? undefined : \"0 auto\",\n }}\n >\n {children}\n </div>\n );\n }\n\n // Default implementation\n return (\n <div\n className={cn(\n \"fixed z-50 p-4\",\n position === \"bottom\" && \"bottom-0 left-0 right-0\",\n position === \"top\" && \"top-0 left-0 right-0\",\n position === \"center\" &&\n \"top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2\",\n animation === \"slide\" && \"animate-slide-in\",\n animation === \"fade\" && \"animate-fade-in\",\n className,\n )}\n style={{\n backgroundColor: theme?.backgroundColor || \"white\",\n color: theme?.textColor,\n }}\n >\n <div\n className=\"mx-auto\"\n style={{\n maxWidth: fullWidth ? undefined : maxWidth,\n }}\n >\n <div className=\"bg-white rounded-lg shadow-lg p-6\">\n <h3 className=\"text-lg font-semibold mb-2\">Cookie Consent</h3>\n <p className=\"text-gray-600 mb-4\">\n We use cookies to enhance your experience. By continuing to visit\n this site you agree to our use of cookies.\n </p>\n <div className=\"flex gap-3 flex-wrap\">\n <Button\n onClick={acceptAll}\n style={{ backgroundColor: theme?.primaryColor }}\n >\n Accept All\n </Button>\n <Button onClick={rejectAll} variant=\"outline\">\n Reject All\n </Button>\n <Button onClick={openSettings} variant=\"ghost\">\n Manage Preferences\n </Button>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\n// Sub-components for composition\nconst Message = ({\n children,\n className,\n}: {\n children: ReactNode;\n className?: string;\n}) => <div className={cn(\"mb-4\", className)}>{children}</div>;\nMessage.displayName = \"ConsentBanner.Message\";\n\nconst Actions = ({\n children,\n className,\n}: {\n children: ReactNode;\n className?: string;\n}) => <div className={cn(\"flex gap-3 flex-wrap\", className)}>{children}</div>;\nActions.displayName = \"ConsentBanner.Actions\";\n\nConsentBanner.Message = Message;\nConsentBanner.Actions = Actions;\n\nexport { ConsentBanner };\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as SwitchPrimitive from \"@radix-ui/react-switch\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Switch({\n className,\n ...props\n}: React.ComponentProps<typeof SwitchPrimitive.Root>) {\n return (\n <SwitchPrimitive.Root\n data-slot=\"switch\"\n className={cn(\n \"peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb\n data-slot=\"switch-thumb\"\n className={cn(\n \"bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0\"\n )}\n />\n </SwitchPrimitive.Root>\n )\n}\n\nexport { Switch }\n","import * as React from \"react\"\nimport { cn } from \"@/lib/utils\"\n\ninterface DialogProps {\n open?: boolean\n onOpenChange?: (open: boolean) => void\n children: React.ReactNode\n}\n\nconst Dialog = ({ open, onOpenChange, children }: DialogProps) => {\n if (!open) return null\n\n return (\n <div className=\"fixed inset-0 z-50 flex items-center justify-center\">\n <div \n className=\"fixed inset-0 bg-black/50\" \n onClick={() => onOpenChange?.(false)}\n />\n {children}\n </div>\n )\n}\n\nconst DialogContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & { unstyled?: boolean }\n>(({ className, children, unstyled, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n !unstyled && \"relative z-50 grid w-full max-w-lg gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg\",\n className\n )}\n {...props}\n >\n {children}\n </div>\n))\nDialogContent.displayName = \"DialogContent\"\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n)\nDialogHeader.displayName = \"DialogHeader\"\n\nconst DialogTitle = React.forwardRef<\n HTMLHeadingElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h3\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className\n )}\n {...props}\n />\n))\nDialogTitle.displayName = \"DialogTitle\"\n\nconst DialogDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n))\nDialogDescription.displayName = \"DialogDescription\"\n\nexport {\n Dialog,\n DialogContent,\n DialogHeader,\n DialogTitle,\n DialogDescription,\n}","import React, { ReactNode } from 'react';\nimport { useConsent } from '@/contexts/ConsentContext';\nimport { Button } from '@/components/ui/Button';\nimport { Switch } from '@/components/ui/switch';\nimport { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription } from '@/components/ui/dialog';\nimport { SettingsProps } from './ConsentManager';\n\nexport interface ConsentSettingsProps {\n renderSettings?: (props: SettingsProps) => ReactNode;\n theme?: {\n primaryColor?: string;\n textColor?: string;\n backgroundColor?: string;\n };\n unstyled?: boolean;\n className?: string;\n children?: ReactNode;\n}\n\nconst cookieCategories = [\n {\n id: 'necessary',\n name: 'Necessary Cookies',\n description: 'These cookies are essential for the website to function properly.',\n disabled: true,\n },\n {\n id: 'analytics',\n name: 'Analytics Cookies',\n description: 'These cookies help us understand how visitors interact with our website.',\n disabled: false,\n },\n {\n id: 'marketing',\n name: 'Marketing Cookies',\n description: 'These cookies are used to track visitors across websites for marketing purposes.',\n disabled: false,\n },\n {\n id: 'functional',\n name: 'Functional Cookies',\n description: 'These cookies enable personalized features and functionality.',\n disabled: false,\n },\n];\n\nexport const ConsentSettings: React.FC<ConsentSettingsProps> = ({\n renderSettings,\n theme,\n unstyled = false,\n className,\n children,\n}) => {\n const { showSettings, consentState, updateConsent, savePreferences, closeSettings } = useConsent();\n\n if (!showSettings) return null;\n\n const handleSave = () => {\n savePreferences(consentState);\n };\n\n // Custom render function\n if (renderSettings) {\n return (\n <>\n {renderSettings({\n consentState,\n onUpdateConsent: updateConsent,\n onSave: handleSave,\n onClose: closeSettings,\n })}\n </>\n );\n }\n\n // Children-based composition\n if (children) {\n return (\n <Dialog open={showSettings} onOpenChange={closeSettings}>\n <DialogContent className={className} unstyled={unstyled}>\n {children}\n </DialogContent>\n </Dialog>\n );\n }\n\n // Default implementation\n return (\n <Dialog open={showSettings} onOpenChange={closeSettings}>\n <DialogContent className=\"max-w-2xl\">\n <DialogHeader>\n <DialogTitle>Cookie Preferences</DialogTitle>\n <DialogDescription>\n Manage your cookie preferences. You can enable or disable different categories of cookies below.\n </DialogDescription>\n </DialogHeader>\n \n <div className=\"space-y-6 py-4\">\n {cookieCategories.map((category) => (\n <div key={category.id} className=\"flex items-start justify-between space-x-4\">\n <div className=\"flex-1\">\n <h4 className=\"font-medium mb-1\">{category.name}</h4>\n <p className=\"text-sm text-gray-600\">{category.description}</p>\n </div>\n <Switch\n checked={consentState[category.id as keyof typeof consentState]}\n onCheckedChange={(checked) => updateConsent(category.id as keyof typeof consentState, checked)}\n disabled={category.disabled}\n />\n </div>\n ))}\n </div>\n\n <div className=\"flex justify-end gap-3 pt-4 border-t\">\n <Button variant=\"outline\" onClick={closeSettings}>\n Cancel\n </Button>\n <Button\n onClick={handleSave}\n style={{ backgroundColor: theme?.primaryColor }}\n >\n Save Preferences\n </Button>\n </div>\n </DialogContent>\n </Dialog>\n );\n};","import React, { ReactNode } from \"react\";\nimport {\n ConsentProvider,\n ConsentProviderProps,\n ConsentCategories,\n ConsentActions,\n useConsent,\n} from \"@/contexts/ConsentContext\";\nimport { ConsentBanner } from \"./ConsentBanner\";\nimport { ConsentSettings } from \"./ConsentSettings\";\n\nexport interface BannerProps {\n onAcceptAll: () => void;\n onRejectAll: () => void;\n onOpenSettings: () => void;\n}\n\nexport interface SettingsProps {\n consentState: ConsentCategories;\n onUpdateConsent: (category: keyof ConsentCategories, value: boolean) => void;\n onSave: () => void;\n onClose: () => void;\n}\n\nexport interface RenderProps {\n consents: ConsentCategories;\n actions: ConsentActions;\n ui: {\n showBanner: boolean;\n showSettings: boolean;\n openSettings: () => void;\n closeSettings: () => void;\n };\n}\n\nexport interface ConsentManagerProps\n extends Omit<ConsentProviderProps, \"children\"> {\n children?: ReactNode | ((props: RenderProps) => ReactNode);\n headless?: boolean;\n renderBanner?: (props: BannerProps) => ReactNode;\n renderSettings?: (props: SettingsProps) => ReactNode;\n components?: {\n Banner?: React.ComponentType<unknown>;\n Settings?: React.ComponentType<unknown>;\n };\n theme?: {\n primaryColor?: string;\n textColor?: string;\n backgroundColor?: string;\n };\n position?: \"top\" | \"bottom\" | \"center\";\n animation?: \"slide\" | \"fade\" | \"none\";\n fullWidth?: boolean;\n maxWidth?: string;\n}\n\ninterface ConsentManagerComponent extends React.FC<ConsentManagerProps> {\n Banner: typeof ConsentBanner;\n Settings: typeof ConsentSettings;\n}\n\n// Internal component that has access to consent context\nconst ConsentManagerInner: React.FC<\n Omit<ConsentManagerProps, keyof Omit<ConsentProviderProps, \"children\">>\n> = ({\n children,\n headless = false,\n renderBanner,\n renderSettings,\n components,\n theme,\n position = \"bottom\",\n animation = \"slide\",\n fullWidth = true,\n maxWidth = \"1200px\",\n}) => {\n const consent = useConsent();\n\n // If using render props pattern\n if (typeof children === \"function\") {\n const renderProps: RenderProps = {\n consents: consent.consentState,\n actions: {\n acceptAll: consent.acceptAll,\n rejectAll: consent.rejectAll,\n savePreferences: consent.savePreferences,\n updateConsent: consent.updateConsent,\n openSettings: consent.openSettings,\n closeSettings: consent.closeSettings,\n },\n ui: {\n showBanner: consent.showBanner,\n showSettings: consent.showSettings,\n openSettings: consent.openSettings,\n closeSettings: consent.closeSettings,\n },\n };\n return <>{children(renderProps)}</>;\n }\n\n return (\n <>\n {children}\n {!headless && (\n <>\n {components?.Banner ? (\n <components.Banner />\n ) : (\n <ConsentBanner\n renderBanner={renderBanner}\n theme={theme}\n position={position}\n animation={animation}\n fullWidth={fullWidth}\n maxWidth={maxWidth}\n />\n )}\n {components?.Settings ? (\n <components.Settings />\n ) : (\n <ConsentSettings renderSettings={renderSettings} theme={theme} />\n )}\n </>\n )}\n </>\n );\n};\n\nconst ConsentManager: ConsentManagerComponent = ({\n children,\n initialConsent,\n onConsentChange,\n storageKey,\n ...innerProps\n}) => {\n return (\n <ConsentProvider\n initialConsent={initialConsent}\n onConsentChange={onConsentChange}\n storageKey={storageKey}\n >\n <ConsentManagerInner {...innerProps}>{children}</ConsentManagerInner>\n </ConsentProvider>\n );\n};\n\n// Attach sub-components for composition\nConsentManager.Banner = ConsentBanner;\nConsentManager.Settings = ConsentSettings;\n\nexport { ConsentManager };\n","import React, { ReactNode } from 'react';\nimport { useConsent } from '@/contexts/ConsentContext';\n\nexport interface UnstyledConsentBannerProps {\n className?: string;\n children?: ReactNode;\n}\n\nexport const UnstyledConsentBanner: React.FC<UnstyledConsentBannerProps> = ({\n className,\n children,\n}) => {\n const { showBanner, acceptAll, rejectAll, openSettings } = useConsent();\n\n if (!showBanner) return null;\n\n return (\n <div className={className} role=\"region\" aria-label=\"Cookie consent\">\n {children || (\n <>\n <div>\n <h3>Cookie Consent</h3>\n <p>We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies.</p>\n </div>\n <div>\n <button onClick={acceptAll} aria-label=\"Accept all cookies\">\n Accept All\n </button>\n <button onClick={rejectAll} aria-label=\"Reject non-essential cookies\">\n Reject All\n </button>\n <button onClick={openSettings} aria-label=\"Manage cookie preferences\">\n Manage Preferences\n </button>\n </div>\n </>\n )}\n </div>\n );\n};","import React, { ReactNode } from 'react';\nimport { useConsent } from '@/contexts/ConsentContext';\n\nexport interface UnstyledConsentSettingsProps {\n className?: string;\n children?: ReactNode;\n}\n\nconst cookieCategories = [\n {\n id: 'necessary',\n name: 'Necessary Cookies',\n description: 'These cookies are essential for the website to function properly.',\n disabled: true,\n },\n {\n id: 'analytics',\n name: 'Analytics Cookies',\n description: 'These cookies help us understand how visitors interact with our website.',\n disabled: false,\n },\n {\n id: 'marketing',\n name: 'Marketing Cookies',\n description: 'These cookies are used to track visitors across websites for marketing purposes.',\n disabled: false,\n },\n {\n id: 'functional',\n name: 'Functional Cookies',\n description: 'These cookies enable personalized features and functionality.',\n disabled: false,\n },\n];\n\nexport const UnstyledConsentSettings: React.FC<UnstyledConsentSettingsProps> = ({\n className,\n children,\n}) => {\n const { showSettings, consentState, updateConsent, savePreferences, closeSettings } = useConsent();\n\n if (!showSettings) return null;\n\n const handleSave = () => {\n savePreferences(consentState);\n };\n\n return (\n <div className={className} role=\"dialog\" aria-label=\"Cookie preferences\">\n {children || (\n <>\n <div>\n <h2>Cookie Preferences</h2>\n <p>Manage your cookie preferences. You can enable or disable different categories of cookies below.</p>\n </div>\n \n <div>\n {cookieCategories.map((category) => (\n <div key={category.id}>\n <div>\n <h4>{category.name}</h4>\n <p>{category.description}</p>\n </div>\n <input\n type=\"checkbox\"\n checked={consentState[category.id as keyof typeof consentState]}\n onChange={(e) => updateConsent(category.id as keyof typeof consentState, e.target.checked)}\n disabled={category.disabled}\n aria-label={`Toggle ${category.name}`}\n />\n </div>\n ))}\n </div>\n\n <div>\n <button onClick={closeSettings} aria-label=\"Cancel changes\">\n Cancel\n </button>\n <button onClick={handleSave} aria-label=\"Save cookie preferences\">\n Save Preferences\n </button>\n </div>\n </>\n )}\n </div>\n );\n};","import React from 'react';\nimport { useConsent } from '@/contexts/ConsentContext';\n\nexport interface UnstyledConsentToggleProps {\n category: 'analytics' | 'marketing' | 'functional';\n className?: string;\n label?: string;\n}\n\nexport const UnstyledConsentToggle: React.FC<UnstyledConsentToggleProps> = ({\n category,\n className,\n label,\n}) => {\n const { consentState, updateConsent } = useConsent();\n\n return (\n <label className={className}>\n <input\n type=\"checkbox\"\n checked={consentState[category]}\n onChange={(e) => updateConsent(category, e.target.checked)}\n aria-label={label || `Toggle ${category} cookies`}\n />\n {label && <span>{label}</span>}\n </label>\n );\n};","import { useConsent } from '@/contexts/ConsentContext';\n\n/**\n * Hook to access only the consent state without actions\n */\nexport function useConsentState() {\n const { hasUserConsented, consentState, showBanner, showSettings } = useConsent();\n \n return {\n hasUserConsented,\n consentState,\n showBanner,\n showSettings,\n };\n}","import { useConsent } from '@/contexts/ConsentContext';\n\n/**\n * Hook to access only the consent actions without state\n */\nexport function useConsentActions() {\n const {\n acceptAll,\n rejectAll,\n savePreferences,\n openSettings,\n closeSettings,\n updateConsent,\n } = useConsent();\n \n return {\n acceptAll,\n rejectAll,\n savePreferences,\n openSettings,\n closeSettings,\n updateConsent,\n };\n}","import { useEffect, useRef, useCallback } from \"react\";\nimport { useConsent } from \"@/contexts/ConsentContext\";\n\ntype ConsentEventType =\n | \"consent:accepted\"\n | \"consent:rejected\"\n | \"consent:updated\"\n | \"banner:shown\"\n | \"banner:hidden\"\n | \"settings:opened\"\n | \"settings:closed\";\n\ntype ConsentEventListener = (data?: unknown) => void;\n\ninterface ConsentEventManager {\n on: (event: ConsentEventType, listener: ConsentEventListener) => () => void;\n off: (event: ConsentEventType, listener: ConsentEventListener) => void;\n emit: (event: ConsentEventType, data?: unknown) => void;\n}\n\n/**\n * Advanced hook that provides event-driven consent management\n */\nexport function useConsentManager(): ConsentEventManager &\n ReturnType<typeof useConsent> {\n const consent = useConsent();\n const listenersRef = useRef<Map<ConsentEventType, Set<ConsentEventListener>>>(\n new Map(),\n );\n const previousStateRef = useRef({\n hasUserConsented: consent.hasUserConsented,\n showBanner: consent.showBanner,\n showSettings: consent.showSettings,\n consentState: consent.consentState,\n });\n\n // Event emitter implementation\n const emit = useCallback((event: ConsentEventType, data?: unknown) => {\n const listeners = listenersRef.current.get(event);\n if (listeners) {\n listeners.forEach((listener) => listener(data));\n }\n }, []);\n\n const on = useCallback(\n (event: ConsentEventType, listener: ConsentEventListener) => {\n if (!listenersRef.current.has(event)) {\n listenersRef.current.set(event, new Set());\n }\n listenersRef.current.get(event)!.add(listener);\n\n // Return unsubscribe function\n return () => {\n const listeners = listenersRef.current.get(event);\n if (listeners) {\n listeners.delete(listener);\n }\n };\n },\n [],\n );\n\n const off = useCallback(\n (event: ConsentEventType, listener: ConsentEventListener) => {\n const listeners = listenersRef.current.get(event);\n if (listeners) {\n listeners.delete(listener);\n }\n },\n [],\n );\n\n // Track state changes and emit events\n useEffect(() => {\n const prev = previousStateRef.current;\n\n // Check for consent acceptance\n if (!prev.hasUserConsented && consent.hasUserConsented) {\n const allAccepted = Object.entries(consent.consentState)\n .filter(([key]) => key !== \"necessary\")\n .every(([, value]) => value);\n\n if (allAccepted) {\n emit(\"consent:accepted\", consent.consentState);\n } else {\n emit(\"consent:rejected\", consent.consentState);\n }\n }\n\n // Check for consent updates\n if (\n prev.hasUserConsented &&\n consent.hasUserConsented &&\n JSON.stringify(prev.consentState) !== JSON.stringify(consent.consentState)\n ) {\n emit(\"consent:updated\", consent.consentState);\n }\n\n // Check for banner visibility changes\n if (!prev.showBanner && consent.showBanner) {\n emit(\"banner:shown\");\n } else if (prev.showBanner && !consent.showBanner) {\n emit(\"banner:hidden\");\n }\n\n // Check for settings visibility changes\n if (!prev.showSettings && consent.showSettings) {\n emit(\"settings:opened\");\n } else if (prev.showSettings && !consent.showSettings) {\n emit(\"settings:closed\");\n }\n\n // Update previous state\n previousStateRef.current = {\n hasUserConsented: consent.hasUserConsented,\n showBanner: consent.showBanner,\n showSettings: consent.showSettings,\n consentState: { ...consent.consentState },\n };\n }, [consent, emit]);\n\n return {\n ...consent,\n on,\n off,\n emit,\n };\n}\n","\"use client\";\n\n/**\n * Safe localStorage wrapper with error handling\n */\nexport class SafeStorage {\n private static isStorageAvailable(): boolean {\n if (typeof window === \"undefined\") return false;\n\n try {\n const testKey = \"__storage_test__\";\n window.localStorage.setItem(testKey, \"test\");\n window.localStorage.removeItem(testKey);\n return true;\n } catch {\n return false;\n }\n }\n\n static getItem<T = unknown>(key: string, defaultValue?: T): T | null {\n if (!this.isStorageAvailable()) {\n console.warn(\"localStorage is not available\");\n return defaultValue ?? null;\n }\n\n try {\n const item = window.localStorage.getItem(key);\n if (item === null) return defaultValue ?? null;\n\n // Try to parse as JSON, otherwise return as string\n try {\n return JSON.parse(item) as T;\n } catch {\n return item as unknown as T;\n }\n } catch (error) {\n console.error(`Error reading from localStorage: ${key}`, error);\n return defaultValue ?? null;\n }\n }\n\n static setItem(key: string, value: unknown): boolean {\n if (!this.isStorageAvailable()) {\n console.warn(\"localStorage is not available\");\n return false;\n }\n\n try {\n const serialized =\n typeof value === \"string\" ? value : JSON.stringify(value);\n window.localStorage.setItem(key, serialized);\n return true;\n } catch (error) {\n if (error instanceof Error) {\n if (error.name === \"QuotaExceededError\") {\n console.error(\"localStorage quota exceeded\");\n // Try to clear old data\n this.clearOldData();\n // Retry once\n try {\n const serialized =\n typeof value === \"string\" ? value : JSON.stringify(value);\n window.localStorage.setItem(key, serialized);\n return true;\n } catch {\n console.error(\"Failed to save after clearing old data\");\n return false;\n }\n }\n }\n console.error(`Error writing to localStorage: ${key}`, error);\n return false;\n }\n }\n\n static removeItem(key: string): boolean {\n if (!this.isStorageAvailable()) {\n console.warn(\"localStorage is not available\");\n return false;\n }\n\n try {\n window.localStorage.removeItem(key);\n return true;\n } catch (error) {\n console.error(`Error removing from localStorage: ${key}`, error);\n return false;\n }\n }\n\n static clear(): boolean {\n if (!this.isStorageAvailable()) {\n console.warn(\"localStorage is not available\");\n return false;\n }\n\n try {\n window.localStorage.clear();\n return true;\n } catch (error) {\n console.error(\"Error clearing localStorage\", error);\n return false;\n }\n }\n\n /**\n * Get storage size in bytes\n */\n static getStorageSize(): number {\n if (!this.isStorageAvailable()) return 0;\n\n let size = 0;\n try {\n for (const key in window.localStorage) {\n if (window.localStorage.hasOwnProperty(key)) {\n size += window.localStorage[key].length + key.length;\n }\n }\n } catch (error) {\n console.error(\"Error calculating storage size\", error);\n }\n return size;\n }\n\n /**\n * Clear old data based on timestamp\n * Removes items older than specified days\n */\n static clearOldData(daysOld: number = 30): void {\n if (!this.isStorageAvailable()) return;\n\n const cutoffTime = Date.now() - daysOld * 24 * 60 * 60 * 1000;\n const keysToRemove: string[] = [];\n\n try {\n for (const key in window.localStorage) {\n if (window.localStorage.hasOwnProperty(key)) {\n try {\n const item = window.localStorage.getItem(key);\n if (item) {\n const parsed = JSON.parse(item);\n if (parsed.timestamp && parsed.timestamp < cutoffTime) {\n keysToRemove.push(key);\n }\n }\n } catch {\n // If parsing fails, skip this item\n }\n }\n }\n\n // Remove old items\n keysToRemove.forEach((key) => this.removeItem(key));\n } catch (error) {\n console.error(\"Error clearing old data\", error);\n }\n }\n\n /**\n * Wrapper for data with timestamp\n */\n static setItemWithTimestamp(key: string, value: unknown): boolean {\n const wrappedData = {\n data: value,\n timestamp: Date.now(),\n };\n return this.setItem(key, wrappedData);\n }\n\n /**\n * Get item with timestamp check\n */\n static getItemWithTimestamp<T = unknown>(\n key: string,\n maxAge?: number,\n ): T | null {\n const wrapped = this.getItem<{ data: T; timestamp: number }>(key);\n if (!wrapped) return null;\n\n if (maxAge && wrapped.timestamp) {\n const age = Date.now() - wrapped.timestamp;\n if (age > maxAge) {\n this.removeItem(key);\n return null;\n }\n }\n\n return wrapped.data;\n }\n}\n\n// Retry decorator for storage operations\nexport function withRetry<T extends (...args: unknown[]) => unknown>(\n fn: T,\n maxRetries: number = 3,\n delay: number = 100,\n): T {\n return ((...args: Parameters<T>) => {\n let lastError: Error | null = null;\n\n for (let i = 0; i < maxRetries; i++) {\n try {\n return fn(...args);\n } catch (error) {\n lastError = error as Error;\n if (i < maxRetries - 1) {\n // Wait before retrying\n const waitTime = delay * Math.pow(2, i); // Exponential backoff\n const start = Date.now();\n while (Date.now() - start < waitTime) {\n // Busy wait\n }\n }\n }\n }\n\n throw lastError;\n }) as T;\n}\n\n// Export a default instance\nexport const storage = SafeStorage;\n","\"use client\";\n\nimport { ConsentRecord, ConsentHistoryEntry } from \"@/types\";\nimport { v4 as uuidv4 } from \"uuid\";\nimport { storage } from \"./storage\";\n\n// In a real implementation, this would connect to a database\n// For demo purposes, we're using localStorage\n\nconst CONSENT_STORAGE_KEY = \"ndpr_consent_records\";\nconst CONSENT_HISTORY_KEY = \"ndpr_consent_history\";\n\n// Helper function to get consent history\nconst getConsentHistoryHelper = (): ConsentHistoryEntry[] => {\n return storage.getItem<ConsentHistoryEntry[]>(CONSENT_HISTORY_KEY, []) || [];\n};\n\nexport const consentService = {\n // Save a new consent record\n saveConsent: (\n consents: Record<string, boolean>,\n userId?: string,\n ): ConsentRecord => {\n const consentRecord: ConsentRecord = {\n id: uuidv4(),\n userId,\n consents,\n timestamp: new Date(),\n ipAddress: \"Collected server-side in real implementation\",\n userAgent:\n typeof window !== \"undefined\" ? window.navigator.userAgent : \"Unknown\",\n version: \"1.0\",\n };\n\n // Store in localStorage for demo\n // Save as current consent\n if (!storage.setItem(CONSENT_STORAGE_KEY, consentRecord)) {\n throw new Error(\"Failed to save consent record\");\n }\n\n // Add to history\n const historyEntry: ConsentHistoryEntry = {\n timestamp: new Date(),\n consents,\n action: \"granted\",\n ipAddress: \"Collected server-side in real implementation\",\n userAgent:\n typeof window !== \"undefined\" ? window.navigator.userAgent : \"Unknown\",\n version: \"1.0\",\n };\n\n const history = getConsentHistoryHelper();\n history.push(historyEntry);\n if (!storage.setItem(CONSENT_HISTORY_KEY, history)) {\n throw new Error(\"Failed to save consent history\");\n }\n\n return consentRecord;\n },\n\n // Get the current consent record\n getCurrentConsent: (): ConsentRecord | null => {\n return storage.getItem<ConsentRecord>(CONSENT_STORAGE_KEY);\n },\n\n // Get consent history\n getConsentHistory: (): ConsentHistoryEntry[] => {\n return getConsentHistoryHelper();\n },\n\n // Update consent with change reason\n updateConsent: (\n consents: Record<string, boolean>,\n changeReason?: string,\n userId?: string,\n ): ConsentRecord => {\n // Get the previous consent to determine the action\n const previousConsent = consentService.getCurrentConsent();\n\n // Create the new consent record\n const consentRecord: ConsentRecord = {\n id: uuidv4(),\n userId,\n consents,\n timestamp: new Date(),\n ipAddress: \"Collected server-side in real implementation\",\n userAgent:\n typeof window !== \"undefined\" ? window.navigator.userAgent : \"Unknown\",\n version: \"1.0\",\n };\n\n // Store in localStorage for demo\n // Save as current consent\n if (!storage.setItem(CONSENT_STORAGE_KEY, consentRecord)) {\n throw new Error(\"Failed to save consent record\");\n }\n\n // Determine the action type\n let action: \"granted\" | \"revoked\" | \"updated\" = \"updated\";\n if (!previousConsent) {\n action = \"granted\";\n } else {\n const allRevoked = Object.values(consents).every((v) => !v);\n if (allRevoked) {\n action = \"revoked\";\n }\n }\n\n // Add to history\n const historyEntry: ConsentHistoryEntry = {\n timestamp: new Date(),\n consents,\n action,\n ipAddress: \"Collected server-side in real implementation\",\n userAgent:\n typeof window !== \"undefined\" ? window.navigator.userAgent : \"Unknown\",\n version: \"1.0\",\n };\n\n const history = getConsentHistoryHelper();\n history.push(historyEntry);\n if (!storage.setItem(CONSENT_HISTORY_KEY, history)) {\n throw new Error(\"Failed to save consent history\");\n }\n\n return consentRecord;\n },\n\n // Clear all consent data (for testing/development)\n clearConsentData: (): boolean => {\n const clearedCurrent = storage.removeItem(CONSENT_STORAGE_KEY);\n const clearedHistory = storage.removeItem(CONSENT_HISTORY_KEY);\n return clearedCurrent && clearedHistory;\n },\n\n // Check if a specific consent is granted\n hasConsent: (type: string): boolean => {\n const current = consentService.getCurrentConsent();\n if (!current) return false;\n return current.consents[type] === true;\n },\n};\n\nexport default consentService;\n","'use client';\n\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\n// This interface extends the standard HTML input attributes\n// and allows for additional props to be added in the future\n/* eslint-disable-next-line @typescript-eslint/no-empty-object-type */\nexport interface InputProps\n extends React.InputHTMLAttributes<HTMLInputElement> {\n // Custom props can be added here\n}\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"block w-full px-3 py-2 text-base\",\n \"border border-gray-300 dark:border-gray-600 rounded-md shadow-sm\",\n \"bg-white dark:bg-gray-800 text-gray-900 dark:text-white\",\n \"placeholder:text-gray-400 dark:placeholder:text-gray-500\",\n \"focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 dark:focus:ring-blue-400 dark:focus:border-blue-400\",\n \"disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-gray-50 dark:disabled:bg-gray-900\",\n className\n )}\n ref={ref}\n {...props}\n />\n );\n }\n);\n\nInput.displayName = \"Input\";\n\nexport { Input };\n","'use client';\n\nimport React from 'react';\nimport { cn } from '@/lib/utils';\n\n// This interface extends the standard HTML textarea attributes\n// and allows for additional props to be added in the future\n/* eslint-disable-next-line @typescript-eslint/no-empty-object-type */\nexport interface TextAreaProps\n extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {\n // Custom props can be added here\n}\n\nconst TextArea = React.forwardRef<HTMLTextAreaElement, TextAreaProps>(\n ({ className, ...props }, ref) => {\n return (\n <textarea\n className={cn(\n \"block w-full px-3 py-2 text-base\",\n \"border border-gray-300 dark:border-gray-600 rounded-md shadow-sm\",\n \"bg-white dark:bg-gray-800 text-gray-900 dark:text-white\",\n \"placeholder:text-gray-400 dark:placeholder:text-gray-500\",\n \"focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 dark:focus:ring-blue-400 dark:focus:border-blue-400\",\n \"disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-gray-50 dark:disabled:bg-gray-900\",\n \"min-h-[80px] resize-y\",\n \"hover:border-blue-400 dark:hover:border-blue-500 transition-colors duration-200\",\n className\n )}\n ref={ref}\n {...props}\n />\n );\n }\n);\n\nTextArea.displayName = \"TextArea\";\n\nexport { TextArea };\n","'use client';\n\nimport React from 'react';\nimport { cn } from '@/lib/utils';\n\ninterface FormFieldProps extends React.HTMLAttributes<HTMLDivElement> {\n id: string;\n label: string;\n description?: string;\n error?: string;\n required?: boolean;\n}\n\nconst FormField = React.forwardRef<HTMLDivElement, FormFieldProps>(\n ({ id, label, description, error, required = false, className, children, ...props }, ref) => {\n return (\n <div ref={ref} className={cn(\"mb-4\", className)} {...props}>\n <div className=\"mb-1.5\">\n <label \n htmlFor={id} \n className=\"block text-sm font-medium text-gray-900 dark:text-gray-100\"\n >\n {label}\n {required && <span className=\"ml-1 text-red-500\">*</span>}\n </label>\n \n {description && (\n <p className=\"mt-1 text-xs text-gray-500 dark:text-gray-400\">\n {description}\n </p>\n )}\n </div>\n \n <div className=\"mt-1\">\n {children}\n </div>\n \n {error && (\n <p className=\"mt-1.5 text-xs text-red-600 dark:text-red-400\">\n {error}\n </p>\n )}\n </div>\n );\n }\n);\n\nFormField.displayName = \"FormField\";\n\nexport { FormField };\n","'use client';\n\nimport React from 'react';\nimport { cn } from '@/lib/utils';\n\nexport interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> {\n label?: string;\n description?: string;\n}\n\nconst Checkbox = React.forwardRef<HTMLInputElement, CheckboxProps>(\n ({ className, label, description, ...props }, ref) => {\n const generatedId = React.useId();\n const id = props.id || generatedId;\n \n return (\n <div className=\"flex items-start\">\n <div className=\"flex items-center h-5\">\n <input\n type=\"checkbox\"\n id={id}\n className={cn(\n \"h-4 w-4 rounded border-gray-300 text-blue-600\",\n \"focus:ring-blue-500 focus:ring-offset-0\",\n \"disabled:opacity-70 disabled:cursor-not-allowed\",\n className\n )}\n ref={ref}\n {...props}\n />\n </div>\n {(label || description) && (\n <div className=\"ml-3 text-sm\">\n {label && (\n <label \n htmlFor={id} \n className={cn(\n \"font-medium text-gray-900 dark:text-white\",\n props.disabled && \"text-gray-500 dark:text-gray-400\"\n )}\n >\n {label}\n </label>\n )}\n {description && (\n <p className=\"text-gray-500 dark:text-gray-400\">{description}</p>\n )}\n </div>\n )}\n </div>\n );\n }\n);\n\nCheckbox.displayName = \"Checkbox\";\n\nexport { Checkbox };\n","'use client';\n\nimport { useState } from 'react';\nimport { BreachSeverity } from '@/types';\nimport { Input } from '@/components/ui/Input';\nimport { TextArea } from '@/components/ui/TextArea';\nimport { Button } from '@/components/ui/Button';\nimport { FormField } from '@/components/ui/FormField';\nimport { Checkbox } from '@/components/ui/Checkbox';\n\ninterface BreachNotificationFormProps {\n onSubmit: (data: {\n title: string;\n description: string;\n discoveryDate: string;\n affectedDataSubjects: number;\n dataCategories: string[];\n severity: BreachSeverity;\n mitigationSteps: string[];\n reportedToAuthorities: boolean;\n reportedToDataSubjects: boolean;\n }) => void;\n className?: string;\n}\n\nexport default function BreachNotificationForm({\n onSubmit,\n className = '',\n}: BreachNotificationFormProps) {\n const [formData, setFormData] = useState({\n title: '',\n description: '',\n discoveryDate: '',\n affectedDataSubjects: 0,\n dataCategories: [] as string[],\n severity: 'medium' as BreachSeverity,\n mitigationSteps: [] as string[],\n reportedToAuthorities: false,\n reportedToDataSubjects: false,\n });\n \n const [errors, setErrors] = useState<Record<string, string>>({});\n const [isSubmitting, setIsSubmitting] = useState(false);\n const [newMitigationStep, setNewMitigationStep] = useState('');\n const [newDataCategory, setNewDataCategory] = useState('');\n\n // Default data categories\n const defaultDataCategories = [\n 'Personal identifiers (name, ID numbers)',\n 'Contact information',\n 'Financial information',\n 'Health information',\n 'Biometric data',\n 'Location data',\n 'Online identifiers (IP address, cookies)',\n 'Credentials (usernames, passwords)',\n ];\n\n const handleChange = (\n e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>\n ) => {\n const { name, value, type } = e.target as HTMLInputElement;\n \n if (type === 'checkbox') {\n setFormData((prev) => ({\n ...prev,\n [name]: (e.target as HTMLInputElement).checked,\n }));\n } else if (type === 'number') {\n setFormData((prev) => ({\n ...prev,\n [name]: parseInt(value) || 0,\n }));\n } else {\n setFormData((prev) => ({\n ...prev,\n [name]: value,\n }));\n }\n \n // Clear error when field is edited\n if (errors[name]) {\n setErrors((prev) => {\n const newErrors = { ...prev };\n delete newErrors[name];\n return newErrors;\n });\n }\n };\n\n const handleDataCategoryToggle = (category: string) => {\n setFormData((prev) => {\n const updatedCategories = prev.dataCategories.includes(category)\n ? prev.dataCategories.filter((c) => c !== category)\n : [...prev.dataCategories, category];\n \n return {\n ...prev,\n dataCategories: updatedCategories,\n };\n });\n \n // Clear error when field is edited\n if (errors.dataCategories) {\n setErrors((prev) => {\n const newErrors = { ...prev };\n delete newErrors.dataCategories;\n return newErrors;\n });\n }\n };\n\n const handleAddDataCategory = (e?: React.MouseEvent) => {\n // Prevent form submission if this is triggered by a button click\n if (e) {\n e.preventDefault();\n }\n \n if (newDataCategory.trim()) {\n // Check if category already exists to avoid duplicates\n if (!formData.dataCategories.includes(newDataCategory.trim())) {\n setFormData((prev) => ({\n ...prev,\n dataCategories: [...prev.dataCategories, newDataCategory.trim()],\n }));\n }\n setNewDataCategory('');\n \n // Clear error when field is edited\n if (errors.dataCategories) {\n setErrors((prev) => {\n const newErrors = { ...prev };\n delete newErrors.dataCategories;\n return newErrors;\n });\n }\n }\n };\n\n const handleAddMitigationStep = (e?: React.MouseEvent) => {\n // Prevent form submission if this is triggered by a button click\n if (e) {\n e.preventDefault();\n }\n if (newMitigationStep.trim()) {\n setFormData((prev) => ({\n ...prev,\n mitigationSteps: [...prev.mitigationSteps, newMitigationStep.trim()],\n }));\n setNewMitigationStep('');\n \n // Clear error when field is edited\n if (errors.mitigationSteps) {\n setErrors((prev) => {\n const newErrors = { ...prev };\n delete newErrors.mitigationSteps;\n return newErrors;\n });\n }\n }\n };\n\n const handleRemoveMitigationStep = (index: number) => {\n setFormData((prev) => ({\n ...prev,\n mitigationSteps: prev.mitigationSteps.filter((_, i) => i !== index),\n }));\n };\n\n // Handle key press for adding data category and mitigation steps\n const handleKeyPress = (e: React.KeyboardEvent, type: 'category' | 'mitigation') => {\n if (e.key === 'Enter') {\n e.preventDefault();\n if (type === 'category') {\n handleAddDataCategory();\n } else {\n handleAddMitigationStep();\n }\n }\n };\n\n const validateForm = () => {\n const newErrors: Record<string, string> = {};\n \n if (!formData.title.trim()) {\n newErrors.title = 'Title is required';\n }\n \n if (!formData.description.trim()) {\n newErrors.description = 'Description is required';\n }\n \n if (!formData.discoveryDate) {\n newErrors.discoveryDate = 'Discovery date is required';\n }\n \n if (formData.affectedDataSubjects <= 0) {\n newErrors.affectedDataSubjects = 'Number of affected data subjects must be greater than 0';\n }\n \n if (formData.dataCategories.length === 0) {\n newErrors.dataCategories = 'Please select at least one data category';\n }\n \n if (formData.mitigationSteps.length === 0) {\n newErrors.mitigationSteps = 'Please add at least one mitigation step';\n }\n \n setErrors(newErrors);\n return Object.keys(newErrors).length === 0;\n };\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n \n if (!validateForm()) return;\n \n setIsSubmitting(true);\n \n try {\n // In a real implementation, this would call an API\n await new Promise((resolve) => setTimeout(resolve, 1000)); // Simulate API call\n \n onSubmit({\n title: formData.title,\n description: formData.description,\n discoveryDate: formData.discoveryDate,\n affectedDataSubjects: formData.affectedDataSubjects,\n dataCategories: formData.dataCategories,\n severity: formData.severity,\n mitigationSteps: formData.mitigationSteps,\n reportedToAuthorities: formData.reportedToAuthorities,\n reportedToDataSubjects: formData.reportedToDataSubjects,\n });\n } catch (error) {\n console.error('Error submitting breach notification:', error);\n setErrors({\n submit: 'An error occurred while submitting the breach notification. Please try again.',\n });\n } finally {\n setIsSubmitting(false);\n }\n };\n\n return (\n <div className={`bg-white dark:bg-gray-800 shadow-sm rounded-lg border border-gray-200 dark:border-gray-700 p-6 ${className}`}>\n <h3 className=\"text-lg font-medium text-gray-900 dark:text-white mb-4\">Data Breach Notification Form</h3>\n\n <form onSubmit={handleSubmit} className=\"space-y-6\">\n <FormField\n id=\"title\"\n label=\"Breach Title\"\n required\n error={errors.title}\n >\n <Input\n id=\"title\"\n name=\"title\"\n value={formData.title}\n onChange={handleChange}\n placeholder=\"Enter title describing the breach\"\n />\n </FormField>\n\n <FormField\n id=\"description\"\n label=\"Breach Description\"\n required\n error={errors.description}\n >\n <TextArea\n id=\"description\"\n name=\"description\"\n value={formData.description}\n onChange={handleChange}\n rows={4}\n placeholder=\"Detailed description of what happened, how it happened, and the potential impact\"\n />\n </FormField>\n\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-6\">\n <FormField\n id=\"discoveryDate\"\n label=\"Date of Discovery\"\n required\n error={errors.discoveryDate}\n >\n <Input\n type=\"date\"\n id=\"discoveryDate\"\n name=\"discoveryDate\"\n value={formData.discoveryDate}\n onChange={handleChange}\n max={new Date().toISOString().split('T')[0]}\n />\n </FormField>\n\n <FormField\n id=\"affectedDataSubjects\"\n label=\"Number of Affected Data Subjects\"\n required\n error={errors.affectedDataSubjects}\n >\n <Input\n type=\"number\"\n id=\"affectedDataSubjects\"\n name=\"affectedDataSubjects\"\n value={formData.affectedDataSubjects}\n onChange={handleChange}\n min={0}\n />\n </FormField>\n </div>\n\n <FormField\n id=\"severity\"\n label=\"Breach Severity\"\n required\n error={errors.severity}\n >\n <select\n id=\"severity\"\n name=\"severity\"\n value={formData.severity}\n onChange={handleChange}\n className=\"block w-full px-3 py-2 text-base border border-gray-300 dark:border-gray-600 rounded-md shadow-sm bg-white dark:bg-gray-800 text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 dark:focus:ring-blue-400 dark:focus:border-blue-400\"\n >\n <option value=\"low\">Low - Minimal impact on data subjects</option>\n <option value=\"medium\">Medium - Moderate impact on data subjects</option>\n <option value=\"high\">High - Significant impact on data subjects</option>\n <option value=\"critical\">Critical - Severe impact on data subjects</option>\n </select>\n </FormField>\n\n <FormField\n id=\"dataCategories\"\n label=\"Categories of Data Involved\"\n required\n error={errors.dataCategories}\n >\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-2 mt-2\">\n {formData.dataCategories.length > 0 && formData.dataCategories.filter(cat => !defaultDataCategories.includes(cat)).length > 0 && (\n <div className=\"col-span-2 mb-2 p-2 bg-gray-50 dark:bg-gray-800 rounded\">\n <h4 className=\"text-sm font-medium mb-1\">Added Categories:</h4>\n <div className=\"flex flex-wrap gap-2\">\n {formData.dataCategories\n .filter(cat => !defaultDataCategories.includes(cat))\n .map((category, index) => (\n <span key={index} className=\"inline-flex items-center px-2 py-1 rounded text-xs font-medium bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200\">\n {category}\n <button \n type=\"button\" \n className=\"ml-1 text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-300\"\n onClick={() => {\n setFormData(prev => ({\n ...prev,\n dataCategories: prev.dataCategories.filter(c => c !== category)\n }));\n }}\n >\n ×\n </button>\n </span>\n ))}\n </div>\n </div>\n )}\n {defaultDataCategories.map((category) => (\n <Checkbox\n key={category}\n id={`category-${category}`}\n label={category}\n checked={formData.dataCategories.includes(category)}\n onChange={() => handleDataCategoryToggle(category)}\n />\n ))}\n </div>\n \n <div className=\"flex space-x-2 mt-4\">\n <Input\n type=\"text\"\n id=\"newDataCategory\"\n value={newDataCategory}\n onChange={(e) => setNewDataCategory(e.target.value)}\n onKeyPress={(e) => handleKeyPress(e, 'category')}\n placeholder=\"Add other data category\"\n className=\"flex-1\"\n />\n <Button\n type=\"button\"\n onClick={(e) => handleAddDataCategory(e)}\n size=\"sm\"\n >\n Add\n </Button>\n </div>\n </FormField>\n\n <FormField\n id=\"mitigationSteps\"\n label=\"Mitigation Steps Taken\"\n error={errors.mitigationSteps}\n >\n <div className=\"flex space-x-2 mb-2\">\n <Input\n type=\"text\"\n id=\"newMitigationStep\"\n value={newMitigationStep}\n onChange={(e) => setNewMitigationStep(e.target.value)}\n onKeyPress={(e) => handleKeyPress(e, 'mitigation')}\n placeholder=\"e.g., Changed all passwords, Patched vulnerability\"\n className=\"flex-1\"\n />\n <Button\n type=\"button\"\n onClick={(e) => handleAddMitigationStep(e)}\n size=\"sm\"\n >\n Add\n </Button>\n </div>\n \n {formData.mitigationSteps.length > 0 && (\n <ul className=\"mt-2 space-y-1\">\n {formData.mitigationSteps.map((step, index) => (\n <li key={index} className=\"flex items-center justify-between bg-gray-50 dark:bg-gray-700 p-2 rounded\">\n <span className=\"text-sm text-gray-700 dark:text-gray-300\">{step}</span>\n <Button\n type=\"button\"\n onClick={() => handleRemoveMitigationStep(index)}\n variant=\"ghost\"\n size=\"sm\"\n className=\"text-red-600 hover:text-red-800 dark:text-red-400 dark:hover:text-red-300\"\n >\n Remove\n </Button>\n </li>\n ))}\n </ul>\n )}\n </FormField>\n \n <div className=\"space-y-4\">\n <Checkbox\n id=\"reportedToAuthorities\"\n name=\"reportedToAuthorities\"\n checked={formData.reportedToAuthorities}\n onChange={handleChange}\n label=\"Reported to Nigerian Data Protection Commission (NDPC)\"\n />\n \n <Checkbox\n id=\"reportedToDataSubjects\"\n name=\"reportedToDataSubjects\"\n checked={formData.reportedToDataSubjects}\n onChange={handleChange}\n label=\"Reported to affected data subjects\"\n />\n </div>\n \n {errors.submit && (\n <div className=\"rounded-md bg-red-50 dark:bg-red-900/20 p-4\">\n <p className=\"text-sm text-red-700 dark:text-red-400\">{errors.submit}</p>\n </div>\n )}\n \n <div className=\"flex justify-end\">\n <Button\n type=\"submit\"\n disabled={isSubmitting}\n variant=\"default\"\n >\n {isSubmitting ? 'Submitting...' : 'Submit Breach Notification'}\n </Button>\n </div>\n </form>\n </div>\n );\n}\n","import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Card({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card\"\n className={cn(\n \"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n \"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn(\"leading-none font-semibold\", className)}\n {...props}\n />\n )\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n )\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn(\n \"col-start-2 row-span-2 row-start-1 self-start justify-self-end\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-content\"\n className={cn(\"px-6\", className)}\n {...props}\n />\n )\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn(\"flex items-center px-6 [.border-t]:pt-6\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardAction,\n CardDescription,\n CardContent,\n}\n","'use client';\n\nimport React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '@/lib/utils';\n\nconst badgeVariants = cva(\n \"inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2\",\n {\n variants: {\n variant: {\n default: \"bg-gray-700 text-white dark:bg-gray-500 focus:ring-gray-500\",\n primary: \"bg-blue-700 text-white dark:bg-blue-600 focus:ring-blue-500\",\n secondary: \"bg-gray-600 text-white dark:bg-gray-400 focus:ring-gray-500\",\n success: \"bg-green-700 text-white dark:bg-green-600 focus:ring-green-500\",\n danger: \"bg-red-700 text-white dark:bg-red-600 focus:ring-red-500\",\n warning: \"bg-amber-700 text-white dark:bg-amber-600 focus:ring-amber-500\",\n info: \"bg-blue-700 text-white dark:bg-blue-600 focus:ring-blue-500\",\n outline: \"border-2 border-gray-700 dark:border-gray-300 text-gray-900 dark:text-gray-100 focus:ring-gray-500\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof badgeVariants> {}\n\nconst Badge = React.forwardRef<HTMLDivElement, BadgeProps>(\n ({ className, variant, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(badgeVariants({ variant }), className)}\n {...props}\n />\n );\n }\n);\n\nBadge.displayName = \"Badge\";\n\nexport { Badge, badgeVariants };\n","\"use client\";\n\nimport { useState, useEffect } from \"react\";\nimport { RiskAssessmentQuestion } from \"@/types\";\nimport { Button } from \"@/components/ui/Button\";\nimport { Input } from \"@/components/ui/Input\";\nimport { TextArea } from \"@/components/ui/TextArea\";\nimport { FormField } from \"@/components/ui/FormField\";\nimport { Card, CardHeader, CardTitle, CardContent } from \"@/components/ui/Card\";\nimport { Badge } from \"@/components/ui/Badge\";\n\ninterface DPIAQuestionnaireProps {\n questions: RiskAssessmentQuestion[];\n onSubmit: (answers: Record<string, number>, projectName: string) => void;\n className?: string;\n}\n\nexport default function DPIAQuestionnaire({\n questions,\n onSubmit,\n className = \"\",\n}: DPIAQuestionnaireProps) {\n const [projectName, setProjectName] = useState(\"\");\n const [projectDescription, setProjectDescription] = useState(\"\");\n const [dataController, setDataController] = useState(\"\");\n const [assessmentDate, setAssessmentDate] = useState(\n new Date().toISOString().split(\"T\")[0],\n );\n const [answers, setAnswers] = useState<Record<string, number>>({});\n const [currentStep, setCurrentStep] = useState(0);\n const [errors, setErrors] = useState<Record<string, string>>({});\n const [progress, setProgress] = useState(0);\n\n // Since DPIAQuestion doesn't have a category, we'll create a single category\n const categories: Record<string, RiskAssessmentQuestion[]> = {\n \"Assessment Questions\": questions,\n };\n\n const categoryNames = Object.keys(categories);\n\n const handleAnswerChange = (questionId: string, value: number | string) => {\n setAnswers((prev) => ({\n ...prev,\n [questionId]: typeof value === \"string\" ? parseInt(value, 10) : value,\n }));\n\n // Clear error when question is answered\n if (errors[questionId]) {\n setErrors((prev) => {\n const newErrors = { ...prev };\n delete newErrors[questionId];\n return newErrors;\n });\n }\n };\n\n // Render different input types based on question type\n const renderQuestionInput = (question: RiskAssessmentQuestion) => {\n switch (question.type) {\n case \"text\":\n return (\n <Input\n id={question.id}\n value={answers[question.id] || \"\"}\n onChange={(e) => handleAnswerChange(question.id, e.target.value)}\n placeholder={question.guidance}\n className=\"w-full\"\n />\n );\n\n case \"textarea\":\n return (\n <TextArea\n id={question.id}\n value={answers[question.id] || \"\"}\n onChange={(e) => handleAnswerChange(question.id, e.target.value)}\n placeholder={question.guidance}\n rows={4}\n className=\"w-full\"\n />\n );\n\n case \"select\":\n return (\n <select\n id={question.id}\n value={answers[question.id] || \"\"}\n onChange={(e) => handleAnswerChange(question.id, e.target.value)}\n className=\"w-full p-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500\"\n >\n <option value=\"\">Select an option</option>\n {question.options?.map(\n (option: { value: string; label: string }) => (\n <option key={option.value} value={option.value}>\n {option.label}\n </option>\n ),\n )}\n </select>\n );\n\n case \"radio\":\n return question.options?.map(\n (option: { value: string; label: string; riskLevel?: unknown }) => (\n <div\n key={option.value}\n className={`p-3 border rounded-md cursor-pointer transition-colors ${\n answers[question.id] === parseInt(option.value)\n ? \"border-blue-500 bg-blue-50 dark:bg-blue-900/30 dark:border-blue-400\"\n : \"border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-800\"\n }`}\n onClick={() => handleAnswerChange(question.id, option.value)}\n >\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center\">\n <input\n id={`${question.id}-${option.value}`}\n name={question.id}\n type=\"radio\"\n value={option.value}\n checked={answers[question.id] === parseInt(option.value)}\n onChange={() =>\n handleAnswerChange(question.id, option.value)\n }\n className=\"h-4 w-4 border-gray-300 text-blue-600 focus:ring-blue-500\"\n />\n <label\n htmlFor={`${question.id}-${option.value}`}\n className=\"ml-3 block text-sm text-gray-700 dark:text-gray-300 cursor-pointer\"\n >\n {option.label}\n </label>\n </div>\n {option.riskLevel as any &&\n getRiskLevelIndicator(parseInt(option.value))}\n </div>\n </div>\n ),\n );\n\n case \"checkbox\":\n return question.options?.map(\n (option: { value: string; label: string }) => (\n <div key={option.value} className=\"flex items-center\">\n <input\n id={`${question.id}-${option.value}`}\n type=\"checkbox\"\n value={option.value}\n checked={answers[question.id]\n ?.toString()\n .includes(option.value)}\n onChange={(e) => {\n const currentValues =\n answers[question.id]\n ?.toString()\n .split(\",\")\n .filter(Boolean) || [];\n if (e.target.checked) {\n currentValues.push(option.value);\n } else {\n const index = currentValues.indexOf(option.value);\n if (index > -1) currentValues.splice(index, 1);\n }\n handleAnswerChange(question.id, currentValues.join(\",\"));\n }}\n className=\"h-4 w-4 border-gray-300 text-blue-600 focus:ring-blue-500 rounded\"\n />\n <label\n htmlFor={`${question.id}-${option.value}`}\n className=\"ml-3 block text-sm text-gray-700 dark:text-gray-300\"\n >\n {option.label}\n </label>\n </div>\n ),\n );\n\n case \"scale\":\n return (\n <div className=\"space-y-2\">\n <input\n type=\"range\"\n id={question.id}\n min={question.minValue || 1}\n max={question.maxValue || 5}\n value={answers[question.id] || question.minValue || 1}\n onChange={(e) => handleAnswerChange(question.id, e.target.value)}\n className=\"w-full\"\n />\n <div className=\"flex justify-between text-sm text-gray-600\">\n {question.scaleLabels ? (\n Object.entries(question.scaleLabels).map(([value, label]) => (\n <span key={value}>{String(label)}</span>\n ))\n ) : (\n <>\n <span>{question.minValue || 1}</span>\n <span>{question.maxValue || 5}</span>\n </>\n )}\n </div>\n </div>\n );\n\n default:\n return (\n <p className=\"text-gray-500\">\n Unsupported question type: {question.type}\n </p>\n );\n }\n };\n\n // Calculate overall progress\n useEffect(() => {\n const totalQuestions = questions.length;\n const answeredQuestions = Object.keys(answers).length;\n const projectInfoComplete = projectName.trim() !== \"\" ? 1 : 0;\n\n // Calculate progress percentage (project info counts as one question)\n const calculatedProgress = Math.round(\n ((answeredQuestions + projectInfoComplete) / (totalQuestions + 1)) * 100,\n );\n setProgress(calculatedProgress);\n }, [answers, projectName, questions.length]);\n\n const validateStep = (step: number) => {\n const newErrors: Record<string, string> = {};\n\n if (step === 0) {\n if (!projectName.trim()) {\n newErrors.projectName = \"Project name is required\";\n }\n // Description and data controller are optional, so no validation needed\n } else {\n const category = categoryNames[step - 1];\n const categoryQuestions = categories[category];\n\n categoryQuestions.forEach((question) => {\n if (answers[question.id] === undefined) {\n newErrors[question.id] = \"Please select an answer for this question\";\n }\n });\n }\n\n setErrors(newErrors);\n return Object.keys(newErrors).length === 0;\n };\n\n const handleNext = () => {\n if (validateStep(currentStep)) {\n setCurrentStep((prev) => prev + 1);\n }\n };\n\n const handleBack = () => {\n setCurrentStep((prev) => prev - 1);\n };\n\n const handleSubmit = () => {\n if (validateStep(currentStep)) {\n // Submit with just the answers and project name as per interface definition\n onSubmit(answers, projectName);\n }\n };\n\n const renderStepContent = () => {\n if (currentStep === 0) {\n return (\n <div className=\"space-y-6\">\n <h3 className=\"text-lg font-medium text-gray-900 dark:text-white\">\n Project Information\n </h3>\n\n <div className=\"bg-blue-50 dark:bg-blue-900/20 p-4 rounded-md mb-6\">\n <p className=\"text-sm text-blue-800 dark:text-blue-200\">\n This Data Protection Impact Assessment (DPIA) will help you\n identify and minimize data protection risks in your project.\n Please provide accurate information to receive the most relevant\n recommendations.\n </p>\n </div>\n\n <FormField\n id=\"projectName\"\n label=\"Project Name\"\n required\n error={errors.projectName}\n >\n <Input\n id=\"projectName\"\n value={projectName}\n onChange={(e) => setProjectName(e.target.value)}\n placeholder=\"Enter the name of your project or data processing activity\"\n />\n </FormField>\n\n <FormField\n id=\"projectDescription\"\n label=\"Project Description\"\n description=\"Briefly describe the purpose and scope of your project\"\n >\n <TextArea\n id=\"projectDescription\"\n value={projectDescription}\n onChange={(e) => setProjectDescription(e.target.value)}\n rows={3}\n placeholder=\"Briefly describe the purpose and scope of your project\"\n />\n </FormField>\n\n <FormField\n id=\"dataController\"\n label=\"Data Controller\"\n description=\"Organization responsible for the data\"\n >\n <Input\n id=\"dataController\"\n value={dataController}\n onChange={(e) => setDataController(e.target.value)}\n placeholder=\"Name of the organization responsible for the data\"\n />\n </FormField>\n\n <FormField id=\"assessmentDate\" label=\"Assessment Date\">\n <Input\n type=\"date\"\n id=\"assessmentDate\"\n value={assessmentDate}\n onChange={(e) => setAssessmentDate(e.target.value)}\n />\n </FormField>\n </div>\n );\n }\n\n const category = categoryNames[currentStep - 1];\n const categoryQuestions = categories[category];\n\n return (\n <div className=\"space-y-6\">\n <div className=\"flex items-center space-x-2\">\n <div className=\"w-8 h-8 rounded-full bg-blue-100 dark:bg-blue-900 flex items-center justify-center\">\n <span className=\"text-blue-600 dark:text-blue-300 font-medium\">\n {currentStep}\n </span>\n </div>\n <h3 className=\"text-lg font-medium text-gray-900 dark:text-white\">\n {category}\n </h3>\n </div>\n\n <div className=\"bg-gray-50 dark:bg-gray-800 p-4 rounded-md mb-4\">\n <p className=\"text-sm text-gray-600 dark:text-gray-400\">\n {getCategoryDescription(category)}\n </p>\n </div>\n\n {categoryQuestions.map((question, index) => (\n <div\n key={question.id}\n className=\"p-4 border border-gray-200 dark:border-gray-700 rounded-lg space-y-4\"\n >\n <div className=\"flex items-start\">\n <div className=\"flex-shrink-0 w-6 h-6 rounded-full bg-blue-100 dark:bg-blue-900 flex items-center justify-center mr-3 mt-0.5\">\n <span className=\"text-blue-600 dark:text-blue-300 text-xs font-medium\">\n {index + 1}\n </span>\n </div>\n <label className=\"block text-sm font-medium text-gray-800 dark:text-gray-200\">\n {question.text}\n </label>\n </div>\n\n <div className=\"ml-9 space-y-2\">\n {renderQuestionInput(question)}\n </div>\n\n {errors[question.id] && (\n <p className=\"ml-9 text-sm text-red-600 dark:text-red-400\">\n {errors[question.id]}\n </p>\n )}\n </div>\n ))}\n </div>\n );\n };\n\n // Helper function to get category descriptions\n const getCategoryDescription = (category: string): string => {\n switch (category) {\n case \"Data Collection\":\n return \"These questions help assess the risks associated with the types of personal data you collect and the sources of that data.\";\n case \"Data Processing\":\n return \"These questions evaluate how you use, analyze, and transform the personal data within your project.\";\n case \"Data Sharing\":\n return \"These questions examine the risks of sharing personal data with third parties or transferring it across borders.\";\n case \"Security Measures\":\n return \"These questions assess the safeguards you have in place to protect personal data from unauthorized access or breaches.\";\n case \"Data Subject Rights\":\n return \"These questions evaluate how well your project supports individuals in exercising their rights over their personal data.\";\n default:\n return \"Please answer the following questions about your project.\";\n }\n };\n\n // Helper function to display risk level indicators\n const getRiskLevelIndicator = (value: number) => {\n const variants: Record<\n number,\n \"success\" | \"warning\" | \"danger\" | \"primary\"\n > = {\n 1: \"success\",\n 2: \"warning\",\n 3: \"danger\",\n 4: \"danger\",\n };\n\n const labels = {\n 1: \"Low Risk\",\n 2: \"Medium Risk\",\n 3: \"High Risk\",\n 4: \"Very High Risk\",\n };\n\n return (\n <div className=\"flex items-center ml-auto pl-2\">\n <Badge variant={variants[value as keyof typeof variants]}>\n {labels[value as keyof typeof labels]}\n </Badge>\n </div>\n );\n };\n\n const totalSteps = categoryNames.length + 1; // +1 for the project info step\n\n return (\n <Card className={className}>\n <CardHeader>\n <CardTitle>Data Protection Impact Assessment</CardTitle>\n <p className=\"text-sm text-gray-500 dark:text-gray-400\">\n Assess the data protection risks of your project with our DPIA tool.\n </p>\n </CardHeader>\n\n <CardContent>\n <div className=\"mb-6\">\n <div className=\"flex items-center justify-between mb-2\">\n <div className=\"text-sm text-gray-500 dark:text-gray-400\">\n Step {currentStep + 1} of {totalSteps}\n </div>\n <div className=\"text-sm font-medium text-gray-900 dark:text-white\">\n {currentStep === 0\n ? \"Project Information\"\n : categoryNames[currentStep - 1]}\n </div>\n </div>\n <div className=\"h-2 w-full bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden\">\n <div\n className=\"h-2 bg-blue-600 rounded-full transition-all duration-300 ease-in-out\"\n style={{ width: `${((currentStep + 1) / totalSteps) * 100}%` }}\n />\n </div>\n <div className=\"flex justify-between mt-2\">\n <div className=\"text-xs text-gray-500 dark:text-gray-400\">\n Overall completion: {progress}%\n </div>\n {currentStep > 0 && currentStep < totalSteps && (\n <div className=\"text-xs text-gray-500 dark:text-gray-400\">\n {\n categories[categoryNames[currentStep - 1]].filter(\n (q) => answers[q.id] !== undefined,\n ).length\n }{\" \"}\n of {categories[categoryNames[currentStep - 1]].length} questions\n answered\n </div>\n )}\n </div>\n </div>\n\n <div className=\"mb-6\">{renderStepContent()}</div>\n\n <div className=\"flex justify-between pt-4 border-t border-gray-200 dark:border-gray-700\">\n {currentStep > 0 ? (\n <Button type=\"button\" onClick={handleBack} variant=\"outline\">\n <svg\n className=\"w-5 h-5 mr-1\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M15 19l-7-7 7-7\"\n />\n </svg>\n Back\n </Button>\n ) : (\n <div>{/* Empty div to maintain layout */}</div>\n )}\n\n {currentStep < totalSteps - 1 ? (\n <Button type=\"button\" onClick={handleNext} variant=\"default\">\n Next\n <svg\n className=\"w-5 h-5 ml-1\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M9 5l7 7-7 7\"\n />\n </svg>\n </Button>\n ) : (\n <Button type=\"button\" onClick={handleSubmit} variant=\"default\">\n Submit Assessment\n </Button>\n )}\n </div>\n </CardContent>\n </Card>\n );\n}\n","'use client';\n\nimport React from 'react';\nimport { cn } from '@/lib/utils';\n\ninterface LoadingSpinnerProps {\n size?: 'sm' | 'md' | 'lg';\n className?: string;\n}\n\nexport function LoadingSpinner({ size = 'md', className }: LoadingSpinnerProps) {\n const sizeClasses = {\n sm: 'h-4 w-4',\n md: 'h-8 w-8',\n lg: 'h-12 w-12',\n };\n\n return (\n <div\n className={cn('inline-block animate-spin rounded-full border-2 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]', sizeClasses[size], className)}\n role=\"status\"\n aria-label=\"Loading\"\n >\n <span className=\"sr-only\">Loading...</span>\n </div>\n );\n}\n\ninterface LoadingOverlayProps {\n children?: React.ReactNode;\n message?: string;\n}\n\nexport function LoadingOverlay({ children, message = 'Loading...' }: LoadingOverlayProps) {\n return (\n <div className=\"relative\">\n <div className=\"absolute inset-0 bg-white/75 dark:bg-gray-900/75 backdrop-blur-sm z-10 flex items-center justify-center\">\n <div className=\"text-center\">\n <LoadingSpinner size=\"lg\" className=\"mx-auto mb-4 text-blue-600 dark:text-blue-400\" />\n <p className=\"text-sm font-medium text-gray-700 dark:text-gray-300\">{message}</p>\n </div>\n </div>\n {children}\n </div>\n );\n}\n\ninterface LoadingSkeletonProps {\n className?: string;\n lines?: number;\n}\n\nexport function LoadingSkeleton({ className, lines = 1 }: LoadingSkeletonProps) {\n return (\n <div className={cn('animate-pulse', className)}>\n {Array.from({ length: lines }).map((_, i) => (\n <div\n key={i}\n className={cn(\n 'h-4 bg-gray-200 dark:bg-gray-700 rounded',\n i !== lines - 1 && 'mb-2',\n i === lines - 1 && 'w-3/4'\n )}\n />\n ))}\n </div>\n );\n}\n\ninterface LoadingButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n loading?: boolean;\n loadingText?: string;\n children: React.ReactNode;\n}\n\nexport function LoadingButton({ \n loading = false, \n loadingText = 'Loading...', \n children, \n disabled,\n className,\n ...props \n}: LoadingButtonProps) {\n return (\n <button\n disabled={loading || disabled}\n className={cn(\n 'relative inline-flex items-center justify-center',\n loading && 'cursor-not-allowed opacity-70',\n className\n )}\n {...props}\n >\n {loading ? (\n <>\n <LoadingSpinner size=\"sm\" className=\"mr-2\" />\n <span>{loadingText}</span>\n </>\n ) : (\n children\n )}\n </button>\n );\n}\n\ninterface LoadingStateProps {\n loading: boolean;\n error?: Error | null;\n empty?: boolean;\n children: React.ReactNode;\n loadingComponent?: React.ReactNode;\n errorComponent?: React.ReactNode;\n emptyComponent?: React.ReactNode;\n emptyMessage?: string;\n}\n\nexport function LoadingState({\n loading,\n error,\n empty,\n children,\n loadingComponent,\n errorComponent,\n emptyComponent,\n emptyMessage = 'No data found',\n}: LoadingStateProps) {\n if (loading) {\n return (\n <>\n {loadingComponent || (\n <div className=\"flex items-center justify-center py-8\">\n <LoadingSpinner size=\"lg\" />\n </div>\n )}\n </>\n );\n }\n\n if (error) {\n return (\n <>\n {errorComponent || (\n <div className=\"rounded-md bg-red-50 dark:bg-red-900/20 p-4\" role=\"alert\">\n <div className=\"flex\">\n <div className=\"flex-shrink-0\">\n <svg\n className=\"h-5 w-5 text-red-400\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z\"\n clipRule=\"evenodd\"\n />\n </svg>\n </div>\n <div className=\"ml-3\">\n <h3 className=\"text-sm font-medium text-red-800 dark:text-red-200\">\n Error loading data\n </h3>\n <p className=\"mt-1 text-sm text-red-700 dark:text-red-300\">\n {error.message}\n </p>\n </div>\n </div>\n </div>\n )}\n </>\n );\n }\n\n if (empty) {\n return (\n <>\n {emptyComponent || (\n <div className=\"text-center py-8\">\n <svg\n className=\"mx-auto h-12 w-12 text-gray-400\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z\"\n />\n </svg>\n <p className=\"mt-2 text-sm text-gray-500 dark:text-gray-400\">{emptyMessage}</p>\n </div>\n )}\n </>\n );\n }\n\n return <>{children}</>;\n}","\"use client\";\n\nimport { useState, useEffect } from \"react\";\nimport { RequestType } from \"@/types\";\nimport { Input } from \"@/components/ui/Input\";\nimport { TextArea } from \"@/components/ui/TextArea\";\nimport { Button } from \"@/components/ui/Button\";\nimport { FormField } from \"@/components/ui/FormField\";\nimport { Checkbox } from \"@/components/ui/Checkbox\";\nimport { LoadingButton } from \"@/components/ui/Loading\";\nimport { cn } from \"@/lib/utils\";\n\n// Helper function to get icons for request types\nconst getRequestTypeIcon = (requestType: RequestType) => {\n switch (requestType) {\n case \"access\":\n return (\n <svg\n className=\"w-5 h-5\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n >\n <path d=\"M10 12a2 2 0 100-4 2 2 0 000 4z\" />\n <path\n fillRule=\"evenodd\"\n d=\"M.458 10C1.732 5.943 5.522 3 10 3s8.268 2.943 9.542 7c-1.274 4.057-5.064 7-9.542 7S1.732 14.057.458 10zM14 10a4 4 0 11-8 0 4 4 0 018 0z\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n case \"rectification\":\n return (\n <svg\n className=\"w-5 h-5\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n >\n <path d=\"M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zM11.379 5.793L3 14.172V17h2.828l8.38-8.379-2.83-2.828z\" />\n </svg>\n );\n case \"erasure\":\n return (\n <svg\n className=\"w-5 h-5\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n case \"restriction\":\n return (\n <svg\n className=\"w-5 h-5\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n case \"portability\":\n return (\n <svg\n className=\"w-5 h-5\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n >\n <path d=\"M4 3a2 2 0 100 4h12a2 2 0 100-4H4z\" />\n <path\n fillRule=\"evenodd\"\n d=\"M3 8h14v7a2 2 0 01-2 2H5a2 2 0 01-2-2V8zm5 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n case \"objection\":\n return (\n <svg\n className=\"w-5 h-5\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n default:\n return (\n <svg\n className=\"w-5 h-5\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n }\n};\n\ninterface DataSubjectRequestFormProps {\n onSubmit: (data: {\n requestType: RequestType;\n name: string;\n email: string;\n details: string;\n consent: boolean;\n }) => void;\n className?: string;\n}\n\nexport default function DataSubjectRequestForm({\n onSubmit,\n className = \"\",\n}: DataSubjectRequestFormProps) {\n const [formData, setFormData] = useState({\n requestType: \"access\" as RequestType,\n name: \"\",\n email: \"\",\n details: \"\",\n consent: false,\n });\n\n const [errors, setErrors] = useState<Record<string, string>>({});\n const [isSubmitting, setIsSubmitting] = useState(false);\n\n const requestTypeOptions: {\n value: RequestType;\n label: string;\n description: string;\n }[] = [\n {\n value: \"access\",\n label: \"Access to Personal Data\",\n description: \"Request a copy of your personal data that we process\",\n },\n {\n value: \"rectification\",\n label: \"Rectification of Data\",\n description: \"Request correction of inaccurate personal data\",\n },\n {\n value: \"erasure\",\n label: \"Erasure of Data\",\n description:\n 'Request deletion of your personal data (\"right to be forgotten\")',\n },\n {\n value: \"restriction\",\n label: \"Restriction of Processing\",\n description: \"Request to restrict how we process your data\",\n },\n {\n value: \"portability\",\n label: \"Data Portability\",\n description:\n \"Request to receive your data in a structured, machine-readable format\",\n },\n {\n value: \"objection\",\n label: \"Object to Processing\",\n description: \"Object to processing of your personal data\",\n },\n ];\n\n const handleChange = (\n e: React.ChangeEvent<\n HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement\n >,\n ) => {\n const { name, value } = e.target;\n setFormData((prev) => ({\n ...prev,\n [name]: value,\n }));\n\n // Clear error when field is edited\n if (errors[name]) {\n setErrors((prev) => {\n const newErrors = { ...prev };\n delete newErrors[name];\n return newErrors;\n });\n }\n };\n\n const validateForm = () => {\n const newErrors: Record<string, string> = {};\n\n if (!formData.name.trim()) {\n newErrors.name = \"Name is required\";\n }\n\n if (!formData.email.trim()) {\n newErrors.email = \"Email is required\";\n } else if (!/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(formData.email)) {\n newErrors.email = \"Please enter a valid email address\";\n }\n\n if (!formData.details.trim()) {\n newErrors.details = \"Please provide details about your request\";\n }\n\n if (!formData.consent) {\n newErrors.consent =\n \"You must consent to the processing of your data to submit this request\";\n }\n\n setErrors(newErrors);\n return Object.keys(newErrors).length === 0;\n };\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n\n if (!validateForm()) return;\n\n setIsSubmitting(true);\n\n try {\n // In a real implementation, this would call an API\n await new Promise((resolve) => setTimeout(resolve, 1000)); // Simulate API call\n\n onSubmit({\n requestType: formData.requestType,\n name: formData.name,\n email: formData.email,\n details: formData.details,\n consent: formData.consent,\n });\n\n // Reset form after successful submission\n setFormData({\n requestType: \"access\",\n name: \"\",\n email: \"\",\n details: \"\",\n consent: false,\n });\n } catch (error) {\n console.error(\"Error submitting request:\", error);\n setErrors({\n submit:\n \"An error occurred while submitting your request. Please try again.\",\n });\n } finally {\n setIsSubmitting(false);\n }\n };\n\n // Track form completion percentage for progress indicator\n const [completionPercentage, setCompletionPercentage] = useState(0);\n\n // Calculate form completion percentage\n useEffect(() => {\n let filledFields = 0;\n const totalFields = 3; // name, email, details\n\n if (formData.name.trim()) filledFields++;\n if (formData.email.trim()) filledFields++;\n if (formData.details.trim()) filledFields++;\n\n setCompletionPercentage(Math.round((filledFields / totalFields) * 100));\n }, [formData]);\n\n return (\n <div\n className={`bg-white dark:bg-gray-800 shadow-lg rounded-lg overflow-hidden ${className}`}\n >\n {/* Header with progress indicator */}\n <div className=\"bg-gradient-to-r from-blue-600 to-indigo-700 p-6 text-white relative\">\n <h2 className=\"text-xl font-bold mb-2\">\n Submit a Data Subject Request\n </h2>\n <p className=\"text-blue-100 text-sm mb-4\">\n Exercise your rights under the Nigeria Data Protection Regulation\n </p>\n\n {/* Progress bar */}\n <div className=\"w-full h-2 bg-blue-800 rounded-full overflow-hidden mt-2\">\n <div\n className=\"h-full bg-green-400 transition-all duration-300 ease-out\"\n style={{ width: `${completionPercentage}%` }}\n ></div>\n </div>\n <div className=\"flex justify-between text-xs text-blue-200 mt-1\">\n <span>Form Progress</span>\n <span>{completionPercentage}% Complete</span>\n </div>\n </div>\n\n <form onSubmit={handleSubmit} className=\"p-6 space-y-6\">\n {/* Request Type Selection with Icons */}\n <div className=\"mb-8\">\n <label\n htmlFor=\"requestType\"\n className=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2\"\n >\n Request Type\n </label>\n <div className=\"grid grid-cols-2 md:grid-cols-3 gap-3 mb-3\">\n {requestTypeOptions.map((option) => (\n <div\n key={option.value}\n onClick={() =>\n setFormData({ ...formData, requestType: option.value })\n }\n className={cn(\n \"cursor-pointer border rounded-lg p-3 transition-all\",\n formData.requestType === option.value\n ? \"bg-blue-50 border-blue-500 dark:bg-blue-900/30 dark:border-blue-400\"\n : \"border-gray-200 hover:border-gray-300 dark:border-gray-700 dark:hover:border-gray-600\",\n )}\n >\n <div className=\"flex flex-col items-center text-center\">\n <div\n className={cn(\n \"w-10 h-10 flex items-center justify-center rounded-full mb-2\",\n formData.requestType === option.value\n ? \"bg-blue-100 text-blue-600 dark:bg-blue-800 dark:text-blue-300\"\n : \"bg-gray-100 text-gray-600 dark:bg-gray-800 dark:text-gray-400\",\n )}\n >\n {getRequestTypeIcon(option.value)}\n </div>\n <span className=\"text-sm font-medium\">{option.label}</span>\n </div>\n </div>\n ))}\n </div>\n <p className=\"mt-2 text-sm text-gray-500 dark:text-gray-400 bg-gray-50 dark:bg-gray-800/50 p-3 rounded-lg border border-gray-100 dark:border-gray-700\">\n <span className=\"font-medium block mb-1\">About this request:</span>\n {\n requestTypeOptions.find(\n (option) => option.value === formData.requestType,\n )?.description\n }\n </p>\n </div>\n\n {/* Personal Information Section */}\n <div className=\"bg-gray-50 dark:bg-gray-800/50 p-4 rounded-lg border border-gray-100 dark:border-gray-700 mb-6\">\n <h3 className=\"text-md font-medium text-gray-900 dark:text-white mb-4\">\n Personal Information\n </h3>\n\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\n <FormField id=\"name\" label=\"Full Name\" required error={errors.name}>\n <div className=\"relative\">\n <div className=\"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none\">\n <svg\n className=\"h-5 w-5 text-gray-400\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z\"\n clipRule=\"evenodd\"\n />\n </svg>\n </div>\n <Input\n id=\"name\"\n name=\"name\"\n value={formData.name}\n onChange={handleChange}\n className={cn(\n \"pl-10\",\n errors.name &&\n \"border-red-300 focus:border-red-500 focus:ring-red-500\",\n )}\n />\n </div>\n </FormField>\n\n <FormField\n id=\"email\"\n label=\"Email Address\"\n required\n error={errors.email}\n >\n <div className=\"relative\">\n <div className=\"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none\">\n <svg\n className=\"h-5 w-5 text-gray-400\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n >\n <path d=\"M2.003 5.884L10 9.882l7.997-3.998A2 2 0 0016 4H4a2 2 0 00-1.997 1.884z\" />\n <path d=\"M18 8.118l-8 4-8-4V14a2 2 0 002 2h12a2 2 0 002-2V8.118z\" />\n </svg>\n </div>\n <Input\n type=\"email\"\n id=\"email\"\n name=\"email\"\n value={formData.email}\n onChange={handleChange}\n className={cn(\n \"pl-10\",\n errors.email &&\n \"border-red-300 focus:border-red-500 focus:ring-red-500\",\n )}\n />\n </div>\n </FormField>\n </div>\n </div>\n\n {/* Request Details Section */}\n <FormField\n id=\"details\"\n label=\"Request Details\"\n required\n error={errors.details}\n description=\"Your request will be processed in accordance with the Nigeria Data Protection Regulation (NDPR) and Data Protection Act (DPA).\"\n >\n <div className=\"relative\">\n <TextArea\n id=\"details\"\n name=\"details\"\n rows={5}\n value={formData.details}\n onChange={handleChange}\n className={cn(\n errors.details &&\n \"border-red-300 focus:border-red-500 focus:ring-red-500\",\n )}\n placeholder=\"Please provide specific details about your request. For example, what personal data you would like to access, what corrections you need to make, etc.\"\n />\n <div className=\"absolute bottom-2 right-2 text-xs text-gray-400\">\n {formData.details.length} characters\n </div>\n </div>\n </FormField>\n\n {/* Consent Checkbox */}\n <div className=\"mt-4\">\n <Checkbox\n id=\"consent\"\n name=\"consent\"\n checked={formData.consent}\n onChange={(e) =>\n setFormData({ ...formData, consent: e.target.checked })\n }\n label=\"I consent to the processing of my personal data\"\n description=\"By submitting this form, you consent to our processing of your personal data for the purpose of handling your request.\"\n />\n {errors.consent && (\n <p className=\"mt-1 text-sm text-red-600 dark:text-red-400\">\n {errors.consent}\n </p>\n )}\n </div>\n\n {errors.submit && (\n <div className=\"rounded-md bg-red-50 dark:bg-red-900/20 p-4 flex items-start\">\n <svg\n className=\"h-5 w-5 text-red-400 mt-0.5 mr-2\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z\"\n clipRule=\"evenodd\"\n />\n </svg>\n <p className=\"text-sm text-red-700 dark:text-red-400\">\n {errors.submit}\n </p>\n </div>\n )}\n\n <div className=\"flex justify-end pt-4 border-t border-gray-200 dark:border-gray-700\">\n <Button\n type=\"button\"\n variant=\"secondary\"\n onClick={() => {\n setFormData({\n requestType: \"access\",\n name: \"\",\n email: \"\",\n details: \"\",\n consent: false,\n });\n setErrors({});\n }}\n className=\"mr-3\"\n >\n Reset Form\n </Button>\n <LoadingButton\n type=\"submit\"\n loading={isSubmitting}\n loadingText=\"Processing...\"\n className=\"px-6 py-2 bg-blue-600 text-white hover:bg-blue-700 rounded-md font-medium\"\n >\n Submit Request\n </LoadingButton>\n </div>\n </form>\n </div>\n );\n}\n","'use client';\n\nimport React from 'react';\nimport { FormField } from '@/components/ui/FormField';\nimport { Input } from '@/components/ui/Input';\nimport { TextArea } from '@/components/ui/TextArea';\nimport { Checkbox } from '@/components/ui/Checkbox';\nimport { Card, CardContent, CardHeader, CardTitle, CardDescription } from '@/components/ui/Card';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { cn } from '@/lib/utils';\n\ninterface OrganizationInfoStepProps {\n formData: {\n organizationName: string;\n organizationContact: string;\n organizationWebsite: string;\n organizationAddress: string;\n hasDPO: boolean;\n dpoContact: string;\n includeNDPRCompliance: boolean;\n };\n errors: Record<string, string>;\n onChange: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;\n}\n\nexport default function OrganizationInfoStep({\n formData,\n errors,\n onChange,\n}: OrganizationInfoStepProps) {\n return (\n <div className=\"space-y-8\">\n <Card className=\"overflow-hidden shadow-md border border-gray-200 dark:border-gray-700\">\n <CardHeader className=\"bg-gradient-to-r from-slate-100 to-gray-100 dark:from-slate-800 dark:to-gray-800 pb-3\">\n <CardTitle className=\"text-lg font-semibold text-gray-800 dark:text-white\">Organization Details</CardTitle>\n <CardDescription className=\"text-sm text-gray-600 dark:text-gray-300\">\n Provide information about your organization for the privacy policy\n </CardDescription>\n </CardHeader>\n <CardContent className=\"pt-5\">\n\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-4\">\n <FormField\n id=\"organizationName\"\n label=\"Organization Name\"\n required\n error={errors.organizationName}\n className=\"md:col-span-2\"\n >\n <Input\n type=\"text\"\n id=\"organizationName\"\n name=\"organizationName\"\n value={formData.organizationName}\n onChange={onChange}\n placeholder=\"e.g., Acme Corporation\"\n aria-required=\"true\"\n className={errors.organizationName ? 'border-red-300 focus:border-red-500 focus:ring-red-500' : ''}\n />\n </FormField>\n\n <FormField\n id=\"organizationContact\"\n label=\"Contact Information\"\n required\n error={errors.organizationContact}\n >\n <div className=\"relative\">\n <div className=\"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" className=\"h-5 w-5 text-gray-400\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\">\n <path d=\"M2.003 5.884L10 9.882l7.997-3.998A2 2 0 0016 4H4a2 2 0 00-1.997 1.884z\" />\n <path d=\"M18 8.118l-8 4-8-4V14a2 2 0 002 2h12a2 2 0 002-2V8.118z\" />\n </svg>\n </div>\n <Input\n type=\"text\"\n id=\"organizationContact\"\n name=\"organizationContact\"\n value={formData.organizationContact}\n onChange={onChange}\n placeholder=\"email@example.com or phone\"\n aria-required=\"true\"\n className={`pl-10 ${errors.organizationContact ? 'border-red-300 focus:border-red-500 focus:ring-red-500' : ''}`}\n />\n </div>\n </FormField>\n\n <FormField\n id=\"organizationWebsite\"\n label=\"Website (Optional)\"\n error={errors.organizationWebsite}\n >\n <div className=\"relative\">\n <div className=\"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" className=\"h-5 w-5 text-gray-400\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\">\n <path fillRule=\"evenodd\" d=\"M4.083 9h1.946c.089-1.546.383-2.97.837-4.118A6.004 6.004 0 004.083 9zM10 2a8 8 0 100 16 8 8 0 000-16zm0 2c-.076 0-.232.032-.465.262-.238.234-.497.623-.737 1.182-.389.907-.673 2.142-.766 3.556h3.936c-.093-1.414-.377-2.649-.766-3.556-.24-.56-.5-.948-.737-1.182C10.232 4.032 10.076 4 10 4zm3.971 5c-.089-1.546-.383-2.97-.837-4.118A6.004 6.004 0 0115.917 9h-1.946zm-2.003 2H8.032c.093 1.414.377 2.649.766 3.556.24.56.5.948.737 1.182.233.23.389.262.465.262.076 0 .232-.032.465-.262.238-.234.498-.623.737-1.182.389-.907.673-2.142.766-3.556zm1.166 4.118c.454-1.147.748-2.572.837-4.118h1.946a6.004 6.004 0 01-2.783 4.118zm-6.268 0C6.412 13.97 6.118 12.546 6.03 11H4.083a6.004 6.004 0 002.783 4.118z\" clipRule=\"evenodd\" />\n </svg>\n </div>\n <Input\n type=\"text\"\n id=\"organizationWebsite\"\n name=\"organizationWebsite\"\n value={formData.organizationWebsite}\n onChange={onChange}\n placeholder=\"e.g., https://www.example.com\"\n className=\"pl-10\"\n />\n </div>\n </FormField>\n </div>\n\n <FormField\n id=\"organizationAddress\"\n label=\"Address (Optional)\"\n error={errors.organizationAddress}\n className=\"mt-4\"\n >\n <TextArea\n id=\"organizationAddress\"\n name=\"organizationAddress\"\n value={formData.organizationAddress}\n onChange={onChange}\n rows={2}\n placeholder=\"e.g., 123 Main Street, Lagos, Nigeria\"\n />\n </FormField>\n </CardContent>\n </Card>\n\n <Card className=\"overflow-hidden shadow-md border border-gray-200 dark:border-gray-700\">\n <CardHeader className=\"bg-gradient-to-r from-slate-100 to-gray-100 dark:from-slate-800 dark:to-gray-800 pb-3\">\n <CardTitle className=\"text-lg font-semibold text-gray-800 dark:text-white\">Compliance Settings</CardTitle>\n <CardDescription className=\"text-sm text-gray-600 dark:text-gray-300\">\n Configure data protection compliance options\n </CardDescription>\n </CardHeader>\n <CardContent className=\"pt-5\">\n\n <Checkbox\n id=\"hasDPO\"\n name=\"hasDPO\"\n label=\"We have a Data Protection Officer (DPO)\"\n checked={formData.hasDPO}\n onChange={onChange}\n />\n\n {formData.hasDPO && (\n <div className=\"ml-8 mt-2 mb-4\">\n <FormField\n id=\"dpoContact\"\n label=\"DPO Contact Information\"\n required\n error={errors.dpoContact}\n >\n <div className=\"relative\">\n <div className=\"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" className=\"h-5 w-5 text-gray-400\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\">\n <path fillRule=\"evenodd\" d=\"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z\" clipRule=\"evenodd\" />\n </svg>\n </div>\n <Input\n type=\"text\"\n id=\"dpoContact\"\n name=\"dpoContact\"\n value={formData.dpoContact}\n onChange={onChange}\n placeholder=\"dpo@example.com or phone number\"\n aria-required=\"true\"\n className={`pl-10 ${errors.dpoContact ? 'border-red-300 focus:border-red-500 focus:ring-red-500' : ''}`}\n />\n </div>\n </FormField>\n </div>\n )}\n\n <Checkbox\n id=\"includeNDPRCompliance\"\n name=\"includeNDPRCompliance\"\n label=\"Include NDPR and DPA compliance statements\"\n checked={formData.includeNDPRCompliance}\n onChange={onChange}\n />\n\n <div className=\"mt-4 p-3 bg-indigo-50 dark:bg-indigo-900/20 rounded-lg border border-indigo-100 dark:border-indigo-800/30\">\n <div className=\"flex\">\n <div className=\"flex-shrink-0\">\n <svg className=\"h-5 w-5 text-indigo-400\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\">\n <path fillRule=\"evenodd\" d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z\" clipRule=\"evenodd\" />\n </svg>\n </div>\n <div className=\"ml-3 flex-1 md:flex md:justify-between\">\n <p className=\"text-sm text-indigo-700 dark:text-indigo-300\">\n Including compliance statements helps demonstrate your commitment to data protection regulations.\n </p>\n </div>\n </div>\n </div>\n </CardContent>\n </Card>\n </div>\n );\n}\n","'use client';\n\nimport React from 'react';\nimport { cn } from '@/lib/utils';\n\ninterface CheckboxGroupProps {\n title: string;\n items: string[];\n selectedItems: string[];\n onToggleItem: (item: string) => void;\n required?: boolean;\n error?: string;\n columns?: 1 | 2 | 3;\n className?: string;\n}\n\nexport default function CheckboxGroup({\n title,\n items,\n selectedItems,\n onToggleItem,\n required = false,\n error,\n columns = 2,\n className = '',\n}: CheckboxGroupProps) {\n return (\n <div className={cn(\"relative\", className)}>\n {title && (\n <label className=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2\">\n {title} {required && <span className=\"text-red-500\">*</span>}\n </label>\n )}\n \n {error && (\n <p className=\"mt-1 mb-2 text-sm font-medium text-red-600 dark:text-red-400\">{error}</p>\n )}\n \n <div className={cn(\n \"grid gap-x-4 gap-y-2 mt-1\",\n columns === 1 ? \"grid-cols-1\" : \n columns === 2 ? \"grid-cols-1 sm:grid-cols-2\" : \n \"grid-cols-1 sm:grid-cols-2 md:grid-cols-3\"\n )}>\n {items.map((item) => {\n const isSelected = selectedItems.includes(item);\n const itemId = `item-${item.replace(/\\s+/g, '-').toLowerCase()}`;\n \n return (\n <div key={itemId} className=\"flex items-start group\">\n <div className=\"flex items-center h-5\">\n <input\n id={itemId}\n type=\"checkbox\"\n checked={isSelected}\n onChange={() => onToggleItem(item)}\n className={cn(\n \"h-4 w-4 rounded border-2 transition-colors duration-200\",\n \"focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500\",\n isSelected \n ? \"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500\" \n : \"border-gray-300 dark:border-gray-600\",\n \"hover:border-blue-500 dark:hover:border-blue-400\"\n )}\n />\n </div>\n <label \n htmlFor={itemId} \n className={cn(\n \"ml-2 text-sm leading-tight\",\n isSelected \n ? \"text-gray-900 dark:text-white font-medium\" \n : \"text-gray-700 dark:text-gray-300\",\n \"group-hover:text-gray-900 dark:group-hover:text-white transition-colors duration-200\"\n )}\n >\n {item}\n </label>\n </div>\n );\n })}\n </div>\n </div>\n );\n}\n","'use client';\n\nimport React from 'react';\nimport { cn } from '@/lib/utils';\n\ninterface FormFieldProps {\n id: string;\n label: string;\n required?: boolean;\n error?: string;\n children: React.ReactNode;\n className?: string;\n description?: string;\n}\n\nexport default function FormField({\n id,\n label,\n required = false,\n error,\n children,\n className = '',\n description,\n}: FormFieldProps) {\n const hasError = !!error;\n\n return (\n <div className={cn('mb-5 space-y-2', className)}>\n <div className=\"flex items-center justify-between\">\n <label \n htmlFor={id} \n className=\"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-gray-700 dark:text-gray-200\"\n >\n {label} {required && <span className=\"text-red-500 ml-1\" aria-hidden=\"true\">*</span>}\n {required && <span className=\"sr-only\">(required)</span>}\n </label>\n </div>\n \n {description && (\n <p className=\"text-sm text-gray-500 dark:text-gray-400\">{description}</p>\n )}\n\n <div className={`relative ${hasError ? 'has-error' : ''}`}>\n {children}\n\n {hasError && (\n <div className=\"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" className=\"h-5 w-5 text-red-500\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\">\n <path fillRule=\"evenodd\" d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z\" clipRule=\"evenodd\" />\n </svg>\n </div>\n )}\n </div>\n\n {hasError && (\n <p className=\"text-sm font-medium text-red-600 dark:text-red-400\" id={`${id}-error`} role=\"alert\">\n {error}\n </p>\n )}\n\n <style>{`\n /* This ensures the error icon doesn't appear on elements that shouldn't have it */\n .has-error > :global(textarea),\n .has-error > :global(input:not([type=\"checkbox\"]):not([type=\"radio\"])),\n .has-error > :global(select) {\n padding-right: 2.5rem;\n border-color: rgb(239, 68, 68);\n }\n\n .has-error > :global(textarea:focus),\n .has-error > :global(input:focus),\n .has-error > :global(select:focus) {\n border-color: rgb(239, 68, 68);\n --tw-ring-color: rgba(239, 68, 68, 0.2);\n }\n `}</style>\n </div>\n );\n}\n","'use client';\n\nimport React from 'react';\nimport { cn } from '@/lib/utils';\n\n// This interface extends the standard HTML select attributes\n// and allows for additional props to be added in the future\n/* eslint-disable-next-line @typescript-eslint/no-empty-object-type */\nexport interface SelectProps\n extends React.SelectHTMLAttributes<HTMLSelectElement> {\n // Custom props can be added here\n}\n\nconst Select = React.forwardRef<HTMLSelectElement, SelectProps>(\n ({ className, children, ...props }, ref) => {\n return (\n <select\n className={cn(\n \"block w-full px-3 py-2 text-base\",\n \"border border-gray-300 dark:border-gray-600 rounded-md shadow-sm\",\n \"bg-white dark:bg-gray-800 text-gray-900 dark:text-white\",\n \"placeholder:text-gray-400 dark:placeholder:text-gray-500\",\n \"focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 dark:focus:ring-blue-400 dark:focus:border-blue-400\",\n \"disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-gray-50 dark:disabled:bg-gray-900\",\n \"appearance-none bg-no-repeat bg-right\",\n \"bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20stroke%3D%22%236b7280%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%221.5%22%20d%3D%22m6%208%204%204%204-4%22%2F%3E%3C%2Fsvg%3E')]\",\n \"bg-[length:1.25em_1.25em] pr-10\",\n \"hover:border-blue-400 dark:hover:border-blue-500 transition-colors duration-200\",\n className\n )}\n ref={ref}\n {...props}\n >\n {children}\n </select>\n );\n }\n);\n\nSelect.displayName = \"Select\";\n\nexport { Select };\n","'use client';\n\nimport React from 'react';\nimport CheckboxGroup from '../shared/CheckboxGroup';\nimport FormField from '../shared/FormField';\nimport { Card, CardContent, CardHeader, CardTitle, CardDescription } from '@/components/ui/Card';\nimport { Select } from '@/components/ui/Select';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { cn } from '@/lib/utils';\n\ninterface DataCollectionStepProps {\n formData: {\n dataCollectionPurposes: string[];\n dataRetentionPeriod: string;\n securityMeasures: string[];\n dataSubjects: string[];\n dataCategories: string[];\n legalBasisForProcessing: string[];\n };\n errors: Record<string, string>;\n onChange: (e: React.ChangeEvent<HTMLSelectElement>) => void;\n onToggleItem: (\n category: \n 'dataCollectionPurposes' | \n 'securityMeasures' | \n 'dataSubjects' | \n 'dataCategories' | \n 'legalBasisForProcessing', \n item: string\n ) => void;\n defaultDataPurposes: string[];\n defaultSecurityMeasures: string[];\n dataSubjectCategories: string[];\n}\n\nexport default function DataCollectionStep({\n formData,\n errors,\n onChange,\n onToggleItem,\n defaultDataPurposes,\n defaultSecurityMeasures,\n dataSubjectCategories,\n}: DataCollectionStepProps) {\n // Define legal basis options\n const legalBasisOptions = [\n 'Consent of the data subject',\n 'Performance of a contract',\n 'Compliance with a legal obligation',\n 'Protection of vital interests',\n 'Performance of a task in the public interest',\n 'Legitimate interests pursued by the controller',\n 'Explicit consent for special categories',\n 'Employment and social security purposes',\n 'Vital interests where consent cannot be given',\n 'Processing by non-profit bodies',\n 'Data made public by the data subject',\n 'Legal claims or judicial acts',\n 'Substantial public interest',\n 'Preventive or occupational medicine',\n 'Public health',\n 'Archiving, research and statistics'\n ];\n\n // Define data categories\n const dataCategories = [\n 'Personal identifiers (name, email, phone)',\n 'Contact information',\n 'Location data',\n 'Financial information',\n 'Transaction data',\n 'Technical data (IP address, device info)',\n 'Profile data',\n 'Usage data',\n 'Marketing preferences',\n 'Communications data',\n 'Employment information',\n 'Education information',\n 'Biometric data',\n 'Health data',\n 'Government identifiers'\n ];\n\n return (\n <div className=\"space-y-8\">\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-6\">\n {/* Left Column */}\n <div className=\"space-y-6\">\n <Card className=\"overflow-hidden shadow-md border border-gray-200 dark:border-gray-700\">\n <CardHeader className=\"bg-gradient-to-r from-slate-100 to-gray-100 dark:from-slate-800 dark:to-gray-800 pb-3\">\n <CardTitle className=\"text-lg font-semibold text-gray-800 dark:text-white\">Data Collection Purposes</CardTitle>\n <CardDescription className=\"text-sm text-gray-600 dark:text-gray-300\">\n Select all the purposes for which you collect personal data\n </CardDescription>\n </CardHeader>\n <CardContent className=\"pt-5\">\n <CheckboxGroup\n title=\"\"\n items={defaultDataPurposes}\n selectedItems={formData.dataCollectionPurposes}\n onToggleItem={(item) => onToggleItem('dataCollectionPurposes', item)}\n required\n error={errors.dataCollectionPurposes}\n columns={1}\n className=\"space-y-1\"\n />\n </CardContent>\n </Card>\n\n <Card className=\"overflow-hidden shadow-md border border-gray-200 dark:border-gray-700\">\n <CardHeader className=\"bg-gradient-to-r from-slate-100 to-gray-100 dark:from-slate-800 dark:to-gray-800 pb-3\">\n <CardTitle className=\"text-lg font-semibold text-gray-800 dark:text-white\">Data Retention</CardTitle>\n <CardDescription className=\"text-sm text-gray-600 dark:text-gray-300\">\n Specify how long you retain personal data\n </CardDescription>\n </CardHeader>\n <CardContent className=\"pt-5\">\n <FormField\n id=\"dataRetentionPeriod\"\n label=\"Data Retention Period\"\n required\n error={errors.dataRetentionPeriod}\n >\n <Select\n id=\"dataRetentionPeriod\"\n name=\"dataRetentionPeriod\"\n value={formData.dataRetentionPeriod}\n onChange={onChange}\n >\n <option value=\"\">Select a retention period</option>\n <option value=\"1 year\">1 year</option>\n <option value=\"2 years\">2 years</option>\n <option value=\"3 years\">3 years</option>\n <option value=\"5 years\">5 years</option>\n <option value=\"7 years\">7 years</option>\n <option value=\"10 years\">10 years</option>\n <option value=\"as long as necessary for the purposes described\">As long as necessary</option>\n </Select>\n </FormField>\n </CardContent>\n </Card>\n\n <Card className=\"overflow-hidden shadow-md border border-gray-200 dark:border-gray-700\">\n <CardHeader className=\"bg-gradient-to-r from-slate-100 to-gray-100 dark:from-slate-800 dark:to-gray-800 pb-3\">\n <CardTitle className=\"text-lg font-semibold text-gray-800 dark:text-white\">Data Subjects</CardTitle>\n <CardDescription className=\"text-sm text-gray-600 dark:text-gray-300\">\n Select the categories of individuals whose data you process\n </CardDescription>\n </CardHeader>\n <CardContent className=\"pt-5\">\n <CheckboxGroup\n title=\"\"\n items={dataSubjectCategories}\n selectedItems={formData.dataSubjects}\n onToggleItem={(item) => onToggleItem('dataSubjects', item)}\n required\n error={errors.dataSubjects}\n columns={1}\n className=\"space-y-1\"\n />\n </CardContent>\n </Card>\n </div>\n\n {/* Right Column */}\n <div className=\"space-y-6\">\n <Card className=\"overflow-hidden shadow-md border border-gray-200 dark:border-gray-700\">\n <CardHeader className=\"bg-gradient-to-r from-slate-100 to-gray-100 dark:from-slate-800 dark:to-gray-800 pb-3\">\n <CardTitle className=\"text-lg font-semibold text-gray-800 dark:text-white\">Personal Data Categories</CardTitle>\n <CardDescription className=\"text-sm text-gray-600 dark:text-gray-300\">\n Select the types of personal data you collect\n </CardDescription>\n </CardHeader>\n <CardContent className=\"pt-5\">\n <CheckboxGroup\n title=\"\"\n items={dataCategories}\n selectedItems={formData.dataCategories}\n onToggleItem={(item) => onToggleItem('dataCategories', item)}\n required\n error={errors.dataCategories}\n columns={1}\n className=\"space-y-1\"\n />\n </CardContent>\n </Card>\n\n <Card className=\"overflow-hidden shadow-md border border-gray-200 dark:border-gray-700\">\n <CardHeader className=\"bg-gradient-to-r from-slate-100 to-gray-100 dark:from-slate-800 dark:to-gray-800 pb-3\">\n <CardTitle className=\"text-lg font-semibold text-gray-800 dark:text-white\">Legal Basis</CardTitle>\n <CardDescription className=\"text-sm text-gray-600 dark:text-gray-300\">\n Select the legal grounds for processing personal data\n </CardDescription>\n </CardHeader>\n <CardContent className=\"pt-5\">\n <CheckboxGroup\n title=\"\"\n items={legalBasisOptions}\n selectedItems={formData.legalBasisForProcessing}\n onToggleItem={(item) => onToggleItem('legalBasisForProcessing', item)}\n required\n error={errors.legalBasisForProcessing}\n columns={1}\n className=\"space-y-1\"\n />\n </CardContent>\n </Card>\n </div>\n </div>\n\n <Card className=\"overflow-hidden shadow-md border border-gray-200 dark:border-gray-700\">\n <CardHeader className=\"bg-gradient-to-r from-slate-100 to-gray-100 dark:from-slate-800 dark:to-gray-800 pb-3\">\n <CardTitle className=\"text-lg font-semibold text-gray-800 dark:text-white\">Security Measures</CardTitle>\n <CardDescription className=\"text-sm text-gray-600 dark:text-gray-300\">\n Select the security measures you implement to protect personal data\n </CardDescription>\n </CardHeader>\n <CardContent className=\"pt-5\">\n <CheckboxGroup\n title=\"\"\n items={defaultSecurityMeasures}\n selectedItems={formData.securityMeasures}\n onToggleItem={(item) => onToggleItem('securityMeasures', item)}\n columns={2}\n className=\"space-y-1\"\n />\n </CardContent>\n </Card>\n </div>\n );\n}\n","'use client';\n\nimport React from 'react';\nimport { Checkbox } from '@/components/ui/Checkbox';\nimport { cn } from '@/lib/utils';\n\ninterface CheckboxFieldProps {\n id: string;\n name: string;\n label: string;\n checked: boolean;\n onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;\n className?: string;\n description?: string;\n}\n\nexport default function CheckboxField({\n id,\n name,\n label,\n checked,\n onChange,\n className = '',\n description,\n}: CheckboxFieldProps) {\n return (\n <div className={cn('mb-4', className)}>\n <Checkbox\n id={id}\n name={name}\n label={label}\n checked={checked}\n onChange={onChange}\n description={description}\n />\n </div>\n );\n}\n","'use client';\n\nimport React, { useRef } from 'react';\nimport CheckboxField from '../shared/CheckboxField';\nimport CheckboxGroup from '../shared/CheckboxGroup';\nimport FormField from '../shared/FormField';\nimport { Card, CardContent, CardHeader, CardTitle, CardDescription } from '@/components/ui/Card';\nimport { TextArea } from '@/components/ui/TextArea';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { cn } from '@/lib/utils';\n\ninterface DataSharingStepProps {\n formData: {\n thirdPartySharing: boolean;\n thirdParties: string[];\n thirdPartyCategories: string[];\n thirdPartyPurposes: string[];\n cookiesUsed: boolean;\n cookieTypes: string[];\n cookieLifespan: string;\n trackingTechnologies: string[];\n internationalTransfers: boolean;\n transferCountries: string[];\n transferSafeguards: string[];\n processesChildrenData: boolean;\n childrenDataDetails: string;\n processesSpecialCategories: boolean;\n specialCategoriesDetails: string;\n dataBreachProcedures: string;\n regulatoryCompliance: string[];\n };\n errors: Record<string, string>;\n onChange: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void;\n onToggleItem: (\n category: \n 'cookieTypes' | \n 'transferCountries' | \n 'trackingTechnologies' | \n 'transferSafeguards' | \n 'thirdPartyCategories' | \n 'thirdPartyPurposes' | \n 'regulatoryCompliance', \n item: string\n ) => void;\n onAddThirdParty: () => void;\n onRemoveThirdParty: (index: number) => void;\n defaultCookieTypes: string[];\n commonTransferCountries: string[];\n trackingTechnologies: string[];\n transferSafeguards: string[];\n}\n\nexport default function DataSharingStep({\n formData,\n errors,\n onChange,\n onToggleItem,\n onAddThirdParty,\n onRemoveThirdParty,\n defaultCookieTypes,\n commonTransferCountries,\n trackingTechnologies,\n transferSafeguards,\n}: DataSharingStepProps) {\n const thirdPartyInputRef = useRef<HTMLInputElement>(null);\n\n // Define third party categories\n const thirdPartyCategories = [\n 'Cloud service providers',\n 'Payment processors',\n 'Analytics providers',\n 'Marketing and advertising partners',\n 'Customer support services',\n 'Social media platforms',\n 'Delivery and logistics providers',\n 'IT and system maintenance providers',\n 'Professional advisors (legal, accounting)',\n 'Regulatory authorities',\n 'Business partners',\n 'Affiliates and subsidiaries'\n ];\n\n // Define third party purposes\n const thirdPartyPurposes = [\n 'Processing payments',\n 'Delivering products or services',\n 'Customer support',\n 'Analytics and performance monitoring',\n 'Marketing and advertising',\n 'Fraud prevention and security',\n 'Legal and regulatory compliance',\n 'Service optimization',\n 'Research and development',\n 'Business operations'\n ];\n\n // Define regulatory compliance options\n const regulatoryComplianceOptions = [\n 'General Data Protection Regulation (GDPR)',\n 'California Consumer Privacy Act (CCPA)',\n 'Personal Information Protection and Electronic Documents Act (PIPEDA)',\n 'Health Insurance Portability and Accountability Act (HIPAA)',\n 'Children\\'s Online Privacy Protection Act (COPPA)',\n 'Payment Card Industry Data Security Standard (PCI DSS)',\n 'South Africa\\'s Protection of Personal Information Act (POPIA)',\n 'Kenya\\'s Data Protection Act',\n 'Ghana\\'s Data Protection Act',\n 'ISO 27001 Information Security Standard'\n ];\n\n return (\n <div className=\"space-y-8\">\n {/* Third-Party Sharing */}\n <Card className=\"overflow-hidden shadow-md border border-gray-200 dark:border-gray-700\">\n <CardHeader className=\"bg-gradient-to-r from-slate-100 to-gray-100 dark:from-slate-800 dark:to-gray-800 pb-3\">\n <CardTitle className=\"text-lg font-semibold text-gray-800 dark:text-white\">Third-Party Sharing</CardTitle>\n <CardDescription className=\"text-sm text-gray-600 dark:text-gray-300\">\n Specify if and how you share personal data with third parties\n </CardDescription>\n </CardHeader>\n <CardContent className=\"pt-5\">\n <CheckboxField\n id=\"thirdPartySharing\"\n name=\"thirdPartySharing\"\n label=\"We don't share your data with third parties\"\n checked={formData.thirdPartySharing}\n onChange={onChange}\n className=\"mb-4\"\n />\n\n {formData.thirdPartySharing && (\n <div className=\"space-y-4\">\n <FormField\n id=\"thirdPartyInput\"\n label=\"Add Specific Third Parties\"\n error={errors.thirdParties}\n >\n <div className=\"flex space-x-2 mb-2\">\n <input\n ref={thirdPartyInputRef}\n type=\"text\"\n id=\"thirdPartyInput\"\n placeholder=\"e.g., Google Analytics, Stripe\"\n className=\"block w-full rounded-md border-gray-300 dark:border-gray-600 shadow-sm focus:border-blue-500 focus:ring-blue-500 dark:bg-gray-700 dark:text-white sm:text-sm\"\n />\n <button\n type=\"button\"\n onClick={onAddThirdParty}\n className=\"inline-flex items-center px-3 py-2 border border-transparent text-sm leading-4 font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500\"\n >\n Add\n </button>\n </div>\n </FormField>\n\n {formData.thirdParties.length > 0 && (\n <div className=\"mt-2\">\n <label className=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2\">Added Third Parties:</label>\n <ul className=\"space-y-1\">\n {formData.thirdParties.map((party, index) => (\n <li key={index} className=\"flex justify-between items-center bg-gray-50 dark:bg-gray-800 px-3 py-2 rounded-md text-sm\">\n <span>{party}</span>\n <button\n type=\"button\"\n onClick={() => onRemoveThirdParty(index)}\n className=\"text-red-600 hover:text-red-800 dark:text-red-400 dark:hover:text-red-300\"\n >\n Remove\n </button>\n </li>\n ))}\n </ul>\n </div>\n )}\n\n <CheckboxGroup\n title=\"Categories of Third Parties\"\n items={thirdPartyCategories}\n selectedItems={formData.thirdPartyCategories}\n onToggleItem={(item) => onToggleItem('thirdPartyCategories', item)}\n required\n error={errors.thirdPartyCategories}\n columns={1}\n />\n\n <CheckboxGroup\n title=\"Purposes of Sharing\"\n items={thirdPartyPurposes}\n selectedItems={formData.thirdPartyPurposes}\n onToggleItem={(item) => onToggleItem('thirdPartyPurposes', item)}\n required\n error={errors.thirdPartyPurposes}\n columns={1}\n />\n </div>\n )}\n </CardContent>\n </Card>\n\n {/* Cookies and Tracking */}\n <Card className=\"overflow-hidden shadow-md border border-gray-200 dark:border-gray-700\">\n <CardHeader className=\"bg-gradient-to-r from-slate-100 to-gray-100 dark:from-slate-800 dark:to-gray-800 pb-3\">\n <CardTitle className=\"text-lg font-semibold text-gray-800 dark:text-white\">Cookies and Tracking Technologies</CardTitle>\n <CardDescription className=\"text-sm text-gray-600 dark:text-gray-300\">\n Specify how you use cookies and other tracking technologies\n </CardDescription>\n </CardHeader>\n <CardContent className=\"pt-5\">\n <CheckboxField\n id=\"cookiesUsed\"\n name=\"cookiesUsed\"\n label=\"We use cookies and similar tracking technologies\"\n checked={formData.cookiesUsed}\n onChange={onChange}\n className=\"mb-4\"\n />\n\n {formData.cookiesUsed && (\n <div className=\"space-y-4\">\n <CheckboxGroup\n title=\"Types of Cookies Used\"\n items={defaultCookieTypes}\n selectedItems={formData.cookieTypes}\n onToggleItem={(item) => onToggleItem('cookieTypes', item)}\n required\n error={errors.cookieTypes}\n columns={2}\n />\n\n <FormField\n id=\"cookieLifespan\"\n label=\"Cookie Lifespan\"\n required\n error={errors.cookieLifespan}\n >\n <select\n id=\"cookieLifespan\"\n name=\"cookieLifespan\"\n value={formData.cookieLifespan}\n onChange={onChange}\n className={`mt-1 block w-full rounded-md shadow-sm sm:text-sm ${\n errors.cookieLifespan\n ? 'border-red-300 focus:border-red-500 focus:ring-red-500'\n : 'border-gray-300 dark:border-gray-600 focus:border-blue-500 focus:ring-blue-500'\n } dark:bg-gray-700 dark:text-white`}\n >\n <option value=\"\">Select cookie lifespan</option>\n <option value=\"Session only\">Session only</option>\n <option value=\"1 day\">1 day</option>\n <option value=\"7 days\">7 days</option>\n <option value=\"30 days\">30 days</option>\n <option value=\"90 days\">90 days</option>\n <option value=\"1 year\">1 year</option>\n <option value=\"2 years\">2 years</option>\n <option value=\"Varies by cookie type\">Varies by cookie type</option>\n </select>\n </FormField>\n\n <CheckboxGroup\n title=\"Other Tracking Technologies Used\"\n items={trackingTechnologies}\n selectedItems={formData.trackingTechnologies}\n onToggleItem={(item) => onToggleItem('trackingTechnologies', item)}\n columns={2}\n />\n </div>\n )}\n </CardContent>\n </Card>\n\n {/* International Transfers */}\n <Card className=\"overflow-hidden shadow-md border border-gray-200 dark:border-gray-700\">\n <CardHeader className=\"bg-gradient-to-r from-slate-100 to-gray-100 dark:from-slate-800 dark:to-gray-800 pb-3\">\n <CardTitle className=\"text-lg font-semibold text-gray-800 dark:text-white\">International Data Transfers</CardTitle>\n <CardDescription className=\"text-sm text-gray-600 dark:text-gray-300\">\n Specify if you transfer data internationally and the safeguards in place\n </CardDescription>\n </CardHeader>\n <CardContent className=\"pt-5\">\n <CheckboxField\n id=\"internationalTransfers\"\n name=\"internationalTransfers\"\n label=\"We transfer data internationally\"\n checked={formData.internationalTransfers}\n onChange={onChange}\n className=\"mb-4\"\n />\n\n {formData.internationalTransfers && (\n <div className=\"space-y-4\">\n <CheckboxGroup\n title=\"Countries or Regions of Transfer\"\n items={commonTransferCountries}\n selectedItems={formData.transferCountries}\n onToggleItem={(item) => onToggleItem('transferCountries', item)}\n required\n error={errors.transferCountries}\n columns={2}\n />\n\n <CheckboxGroup\n title=\"Transfer Safeguards\"\n items={transferSafeguards}\n selectedItems={formData.transferSafeguards}\n onToggleItem={(item) => onToggleItem('transferSafeguards', item)}\n required\n error={errors.transferSafeguards}\n columns={1}\n />\n </div>\n )}\n </CardContent>\n </Card>\n\n {/* Special Categories */}\n <Card className=\"overflow-hidden shadow-md border border-gray-200 dark:border-gray-700\">\n <CardHeader className=\"bg-gradient-to-r from-slate-100 to-gray-100 dark:from-slate-800 dark:to-gray-800 pb-3\">\n <CardTitle className=\"text-lg font-semibold text-gray-800 dark:text-white\">Special Categories of Data</CardTitle>\n <CardDescription className=\"text-sm text-gray-600 dark:text-gray-300\">\n Specify if you process children's data or special categories of personal data\n </CardDescription>\n </CardHeader>\n <CardContent className=\"pt-5\">\n <div className=\"space-y-4\">\n <CheckboxField\n id=\"processesChildrenData\"\n name=\"processesChildrenData\"\n label=\"We process data of children under 18\"\n checked={formData.processesChildrenData}\n onChange={onChange}\n className=\"mb-2\"\n />\n\n {formData.processesChildrenData && (\n <FormField\n id=\"childrenDataDetails\"\n label=\"Details about children's data processing\"\n required\n error={errors.childrenDataDetails}\n >\n <TextArea\n id=\"childrenDataDetails\"\n name=\"childrenDataDetails\"\n value={formData.childrenDataDetails}\n onChange={onChange}\n rows={3}\n placeholder=\"Explain how you collect, use, and protect children's data, including parental consent mechanisms\"\n />\n </FormField>\n )}\n\n <CheckboxField\n id=\"processesSpecialCategories\"\n name=\"processesSpecialCategories\"\n label=\"We process special categories of data (race, ethnicity, health, biometric, etc.)\"\n checked={formData.processesSpecialCategories}\n onChange={onChange}\n className=\"mb-2\"\n />\n\n {formData.processesSpecialCategories && (\n <FormField\n id=\"specialCategoriesDetails\"\n label=\"Details about special category data processing\"\n required\n error={errors.specialCategoriesDetails}\n >\n <TextArea\n id=\"specialCategoriesDetails\"\n name=\"specialCategoriesDetails\"\n value={formData.specialCategoriesDetails}\n onChange={onChange}\n rows={3}\n placeholder=\"Explain what special categories of data you process, why, and the legal basis for processing\"\n />\n </FormField>\n )}\n </div>\n </CardContent>\n </Card>\n\n {/* Additional Compliance */}\n <Card className=\"overflow-hidden shadow-md border border-gray-200 dark:border-gray-700\">\n <CardHeader className=\"bg-gradient-to-r from-slate-100 to-gray-100 dark:from-slate-800 dark:to-gray-800 pb-3\">\n <CardTitle className=\"text-lg font-semibold text-gray-800 dark:text-white\">Additional Compliance</CardTitle>\n <CardDescription className=\"text-sm text-gray-600 dark:text-gray-300\">\n Specify additional compliance measures and regulatory frameworks\n </CardDescription>\n </CardHeader>\n <CardContent className=\"pt-5\">\n <div className=\"space-y-4\">\n <FormField\n id=\"dataBreachProcedures\"\n label=\"Data Breach Procedures\"\n >\n <TextArea\n id=\"dataBreachProcedures\"\n name=\"dataBreachProcedures\"\n value={formData.dataBreachProcedures}\n onChange={onChange}\n rows={3}\n placeholder=\"Describe your procedures for handling data breaches, including notification timelines\"\n />\n </FormField>\n\n <CheckboxGroup\n title=\"Additional Regulatory Compliance\"\n items={regulatoryComplianceOptions}\n selectedItems={formData.regulatoryCompliance}\n onToggleItem={(item) => onToggleItem('regulatoryCompliance', item)}\n columns={1}\n />\n </div>\n </CardContent>\n </Card>\n </div>\n );\n}\n","\"use client\";\n\nimport React, { useRef, useState } from \"react\";\nimport { FormField } from \"@/components/ui/FormField\";\nimport { Button } from \"@/components/ui/Button\";\nimport { Input } from \"@/components/ui/Input\";\nimport { TextArea } from \"@/components/ui/TextArea\";\nimport {\n Card,\n CardContent,\n CardHeader,\n CardTitle,\n CardDescription,\n} from \"@/components/ui/Card\";\nimport { Select } from \"@/components/ui/Select\";\n\ninterface CustomSectionsStepProps {\n formData: {\n customSections: { title: string; content: string }[];\n industryCategory: string;\n includeNDPRCompliance: boolean;\n };\n onAddCustomSection: (title: string, content: string) => void;\n onRemoveCustomSection: (index: number) => void;\n}\n\ninterface TemplateSectionType {\n id: string;\n title: string;\n description: string;\n content: string;\n categories: string[];\n}\n\nexport default function CustomSectionsStep({\n formData,\n onAddCustomSection,\n onRemoveCustomSection,\n}: CustomSectionsStepProps) {\n const titleInputRef = useRef<HTMLInputElement>(null);\n const contentInputRef = useRef<HTMLTextAreaElement>(null);\n const [selectedTemplate, setSelectedTemplate] = useState<string>(\"\");\n const [showTemplateContent, setShowTemplateContent] =\n useState<boolean>(false);\n\n // Template sections that can be added to the policy\n const templateSections: TemplateSectionType[] = [\n {\n id: \"gdpr-compliance\",\n title: \"GDPR Compliance\",\n description:\n \"Information about compliance with the EU General Data Protection Regulation\",\n content: `In addition to complying with the Nigeria Data Protection Regulation (NDPR) and Data Protection Act (DPA), we also adhere to the European Union's General Data Protection Regulation (GDPR) for users from the European Economic Area (EEA).\n\nWhen processing personal data of individuals in the EEA, we ensure that:\n- We have a lawful basis for processing\n- We implement appropriate technical and organizational measures\n- We facilitate the exercise of data subject rights\n- We have appropriate data transfer mechanisms in place\n- We maintain records of processing activities\n\nFor more information about our GDPR compliance measures, please contact us at the details provided in the 'Contact Us' section.`,\n categories: [\"All\"],\n },\n {\n id: \"california-privacy-rights\",\n title: \"California Privacy Rights\",\n description:\n \"Information about compliance with California privacy laws (CCPA/CPRA)\",\n content: `If you are a California resident, you have specific rights under California privacy laws, including the California Consumer Privacy Act (CCPA) and the California Privacy Rights Act (CPRA).\n\nAs a California resident, you have the right to:\n- Know what personal information we collect about you\n- Request deletion of your personal information\n- Opt-out of the sale or sharing of your personal information\n- Limit the use of your sensitive personal information\n- Non-discrimination for exercising your rights\n\nTo exercise your California privacy rights, please contact us using the information in the 'Contact Us' section. We will respond to verifiable consumer requests within 45 days.`,\n categories: [\"All\"],\n },\n {\n id: \"mobile-app-privacy\",\n title: \"Mobile Application Privacy\",\n description: \"Privacy information specific to mobile applications\",\n content: `Our mobile application collects and processes personal data as described in this Privacy Policy. In addition to the information outlined elsewhere in this policy, our mobile application may:\n\n- Access your device's camera, microphone, or other sensors with your permission\n- Collect device identifiers such as device ID, advertising ID, or similar identifiers\n- Access your location data (precise or approximate) with your permission\n- Collect information about your mobile network and internet connection\n\nYou can control these permissions through your device settings. If you choose to deny certain permissions, some features of the application may not be available or may have limited functionality.`,\n categories: [\"All\"],\n },\n {\n id: \"social-media-integration\",\n title: \"Social Media Integration\",\n description: \"Information about social media features and widgets\",\n content: `Our services may include social media features, such as the Facebook Like button, and widgets, such as the Share button. These features may collect your IP address, which page you are visiting, and may set a cookie to enable the feature to function properly.\n\nSocial media features and widgets are either hosted by a third party or hosted directly on our site. Your interactions with these features are governed by the privacy policy of the company providing it.\n\nIf you choose to connect your account with us to a social media account, we may receive personal information about you from the social media provider, including your profile information, friends or connections list, and other information you have permitted the social media provider to share with third parties.`,\n categories: [\"All\"],\n },\n {\n id: \"ecommerce-payments\",\n title: \"Payment Processing\",\n description: \"Information about payment processing and financial data\",\n content: `When you make a purchase through our services, your payment information is processed by our payment service providers. We do not store complete credit card or debit card details on our servers.\n\nOur payment processors collect and store your payment information in accordance with industry standards and applicable regulations, including the Payment Card Industry Data Security Standard (PCI DSS).\n\nWe may retain certain information about your transactions, such as the date and amount of the purchase, the items purchased, and your billing and shipping information, for record-keeping, accounting, and legal compliance purposes.`,\n categories: [\"E-commerce and retail\", \"Financial services and fintech\"],\n },\n {\n id: \"healthcare-privacy\",\n title: \"Healthcare Information Privacy\",\n description:\n \"Information about healthcare data protection (relevant for healthcare organizations)\",\n content: `We understand the sensitive nature of health information and are committed to protecting the privacy and security of your health data. We implement specific measures to safeguard health information in accordance with applicable healthcare privacy laws.\n\nWe only collect health information with your explicit consent or when necessary to provide our healthcare services. We limit access to health information to authorized personnel who need it to perform their duties.\n\nWe do not use or disclose your health information for marketing purposes without your explicit consent. We maintain audit trails of access to health information and regularly review our security practices to ensure the ongoing protection of your health data.`,\n categories: [\"Healthcare and medical\"],\n },\n {\n id: \"educational-privacy\",\n title: \"Educational Records Privacy\",\n description:\n \"Information about educational data protection (relevant for educational institutions)\",\n content: `We are committed to protecting the privacy of educational records and student information. We collect and process educational data only for legitimate educational purposes and in accordance with applicable education privacy laws.\n\nWe implement specific measures to safeguard educational records, including:\n- Limiting access to authorized personnel with a legitimate educational interest\n- Obtaining appropriate consents for certain uses of student information\n- Providing access to students or parents/guardians to review and correct educational records\n- Implementing security measures specific to the protection of educational data\n\nWe do not use student information for targeted advertising purposes or sell student information to third parties.`,\n categories: [\"Education and e-learning\"],\n },\n {\n id: \"ndpr-dpa-details\",\n title: \"NDPR and DPA Compliance Details\",\n description:\n \"Detailed information about compliance with Nigerian data protection laws\",\n content: `We are committed to full compliance with the Nigeria Data Protection Regulation (NDPR) of 2019 and the Data Protection Act (DPA) of 2023. Our compliance measures include:\n\n1. **Data Protection Officer**: We have appointed a Data Protection Officer responsible for overseeing our data protection strategy and implementation.\n\n2. **Data Protection Impact Assessments**: We conduct DPIAs for high-risk processing activities as required by Section 2.4 of the NDPR and Section 38 of the DPA.\n\n3. **Data Protection Audit**: We conduct annual data protection audits and file audit reports with the Nigeria Data Protection Commission as required by Section 4.1 of the NDPR.\n\n4. **Data Subject Access Request Procedure**: We have implemented a clear procedure for handling data subject access requests within the 30-day timeframe specified in Section 3.1(7) of the NDPR.\n\n5. **Data Breach Notification**: We have established procedures to notify the Nigeria Data Protection Commission and affected data subjects of any data breaches within 72 hours, as required by Section 2.10 of the NDPR and Section 40 of the DPA.\n\n6. **Training and Awareness**: We provide regular training to our staff on data protection principles and practices.\n\n7. **Data Processing Agreements**: We enter into written agreements with all data processors as required by Section 2.7 of the NDPR and Section 37 of the DPA.\n\nFor more information about our NDPR and DPA compliance program, please contact our Data Protection Officer.`,\n categories: [\"All\"],\n },\n ];\n\n // Filter template sections based on industry category\n const filteredTemplateSections = templateSections.filter(\n (template) =>\n template.categories.includes(\"All\") ||\n template.categories.includes(formData.industryCategory),\n );\n\n // Handle adding a template section\n const handleAddTemplateSection = () => {\n if (selectedTemplate) {\n const template = templateSections.find((t) => t.id === selectedTemplate);\n if (template) {\n onAddCustomSection(template.title, template.content);\n setSelectedTemplate(\"\");\n setShowTemplateContent(false);\n }\n }\n };\n\n // Handle adding a custom section\n const handleAddCustomSection = () => {\n if (\n titleInputRef.current &&\n contentInputRef.current &&\n titleInputRef.current.value.trim() &&\n contentInputRef.current.value.trim()\n ) {\n onAddCustomSection(\n titleInputRef.current.value.trim(),\n contentInputRef.current.value.trim(),\n );\n titleInputRef.current.value = \"\";\n contentInputRef.current.value = \"\";\n }\n };\n\n return (\n <div className=\"space-y-8\">\n <Card className=\"overflow-hidden shadow-md border border-gray-200 dark:border-gray-700\">\n <CardHeader className=\"bg-gradient-to-r from-slate-100 to-gray-100 dark:from-slate-800 dark:to-gray-800 pb-3\">\n <CardTitle className=\"text-lg font-semibold text-gray-800 dark:text-white\">\n Template Sections\n </CardTitle>\n <CardDescription className=\"text-sm text-gray-600 dark:text-gray-300\">\n Add pre-written sections to your privacy policy\n </CardDescription>\n </CardHeader>\n <CardContent className=\"pt-5\">\n <div className=\"space-y-3\">\n <FormField id=\"templateSection\" label=\"Select a Template Section\">\n <Select\n id=\"templateSection\"\n value={selectedTemplate}\n onChange={(e) => {\n setSelectedTemplate(e.target.value);\n setShowTemplateContent(!!e.target.value);\n }}\n >\n <option value=\"\">-- Select a template section --</option>\n {filteredTemplateSections.map((template) => (\n <option key={template.id} value={template.id}>\n {template.title} - {template.description}\n </option>\n ))}\n </Select>\n </FormField>\n\n {showTemplateContent && selectedTemplate && (\n <div className=\"mt-3 bg-white dark:bg-gray-800 p-3 rounded border border-gray-200 dark:border-gray-600\">\n <h5 className=\"font-medium text-gray-900 dark:text-white mb-2\">\n {\n templateSections.find((t) => t.id === selectedTemplate)\n ?.title\n }\n </h5>\n <div className=\"text-sm text-gray-700 dark:text-gray-300 whitespace-pre-line max-h-40 overflow-y-auto\">\n {\n templateSections.find((t) => t.id === selectedTemplate)\n ?.content\n }\n </div>\n </div>\n )}\n\n <Button\n variant=\"default\"\n size=\"sm\"\n disabled={!selectedTemplate}\n onClick={handleAddTemplateSection}\n >\n Add Template Section\n </Button>\n </div>\n </CardContent>\n </Card>\n\n {/* Custom Sections */}\n <Card className=\"overflow-hidden shadow-md border border-gray-200 dark:border-gray-700\">\n <CardHeader className=\"bg-gradient-to-r from-slate-100 to-gray-100 dark:from-slate-800 dark:to-gray-800 pb-3\">\n <CardTitle className=\"text-lg font-semibold text-gray-800 dark:text-white\">\n Create Custom Section\n </CardTitle>\n <CardDescription className=\"text-sm text-gray-600 dark:text-gray-300\">\n Add your own custom section to the privacy policy\n </CardDescription>\n </CardHeader>\n <CardContent className=\"pt-5\">\n <div className=\"space-y-3\">\n <FormField id=\"customSectionTitle\" label=\"Section Title\">\n <Input\n id=\"customSectionTitle\"\n ref={titleInputRef}\n placeholder=\"e.g., Cookies Policy, International Transfers\"\n />\n </FormField>\n\n <FormField id=\"customSectionContent\" label=\"Section Content\">\n <TextArea\n id=\"customSectionContent\"\n ref={contentInputRef}\n rows={5}\n placeholder=\"Enter the content for this section...\"\n />\n </FormField>\n\n <Button\n variant=\"default\"\n size=\"sm\"\n onClick={handleAddCustomSection}\n >\n Add Custom Section\n </Button>\n </div>\n </CardContent>\n </Card>\n\n {/* Added Sections List */}\n {formData.customSections.length > 0 && (\n <Card className=\"overflow-hidden shadow-md border border-gray-200 dark:border-gray-700\">\n <CardHeader className=\"bg-gradient-to-r from-slate-100 to-gray-100 dark:from-slate-800 dark:to-gray-800 pb-3\">\n <CardTitle className=\"text-lg font-semibold text-gray-800 dark:text-white\">\n Added Custom Sections\n </CardTitle>\n <CardDescription className=\"text-sm text-gray-600 dark:text-gray-300\">\n Custom sections that will be included in your privacy policy\n </CardDescription>\n </CardHeader>\n <CardContent className=\"pt-5\">\n <ul className=\"space-y-3\">\n {formData.customSections.map((section, index) => (\n <Card key={index} className=\"overflow-visible\">\n <CardContent className=\"pt-4\">\n <div className=\"flex items-center justify-between mb-2\">\n <h5 className=\"font-medium text-gray-900 dark:text-white\">\n {section.title}\n </h5>\n <Button\n variant=\"destructive\"\n size=\"sm\"\n onClick={() => onRemoveCustomSection(index)}\n className=\"text-red-500 hover:text-red-700\"\n >\n Remove\n </Button>\n </div>\n <div className=\"text-sm text-gray-700 dark:text-gray-300 whitespace-pre-line max-h-32 overflow-y-auto\">\n {section.content.length > 200\n ? `${section.content.substring(0, 200)}...`\n : section.content}\n </div>\n {section.content.length > 200 && (\n <Button\n variant=\"link\"\n size=\"sm\"\n onClick={() => alert(section.content)}\n className=\"mt-2 p-0\"\n >\n View Full Content\n </Button>\n )}\n </CardContent>\n </Card>\n ))}\n </ul>\n </CardContent>\n </Card>\n )}\n </div>\n );\n}\n","\"use client\";\n\nimport React from \"react\";\nimport { Card, CardContent } from \"@/components/ui/Card\";\n\ninterface PolicyPreviewStepProps {\n formData: {\n organizationName: string;\n organizationContact: string;\n organizationWebsite: string;\n organizationAddress: string;\n dataCollectionPurposes: string[];\n dataRetentionPeriod: string;\n thirdPartySharing: boolean;\n thirdParties: string[];\n securityMeasures: string[];\n cookiesUsed: boolean;\n cookieTypes: string[];\n internationalTransfers: boolean;\n transferCountries: string[];\n customSections: { title: string; content: string }[];\n hasDPO: boolean;\n dpoContact: string;\n includeNDPRCompliance: boolean;\n policyEffectiveDate: string;\n };\n previewRef: React.RefObject<HTMLDivElement | null>;\n}\n\nexport default function PolicyPreviewStep({\n formData,\n previewRef,\n}: PolicyPreviewStepProps) {\n return (\n <div className=\"space-y-8\">\n <Card className=\"transition-all duration-200\">\n <CardContent className=\"p-6\">\n <div className=\"flex items-center justify-between mb-4 pb-3 border-b border-gray-200 dark:border-gray-700\">\n <h3 className=\"text-lg font-medium text-gray-900 dark:text-white flex items-center\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"h-5 w-5 mr-2 text-indigo-500\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z\"\n clipRule=\"evenodd\"\n />\n </svg>\n Privacy Policy Preview\n </h3>\n <span className=\"text-xs text-gray-500 dark:text-gray-400 bg-gray-100 dark:bg-gray-700 px-2 py-1 rounded-full\">\n Preview Mode\n </span>\n </div>\n\n <div\n ref={previewRef}\n className=\"prose dark:prose-invert prose-indigo max-w-none text-base prose-headings:text-gray-800 dark:prose-headings:text-gray-100 prose-p:text-gray-600 dark:prose-p:text-gray-300 prose-li:text-gray-600 dark:prose-li:text-gray-300 prose-h1:text-2xl prose-h1:font-bold prose-h2:text-xl prose-h2:font-semibold prose-h2:border-b prose-h2:border-gray-200 dark:prose-h2:border-gray-700 prose-h2:pb-2 prose-h2:mt-8 overflow-auto\"\n >\n <h1>{formData.organizationName} Privacy Policy</h1>\n\n <h2>Introduction</h2>\n <p>\n This Privacy Policy describes how {formData.organizationName}{\" \"}\n collects, uses, and discloses your personal information.\n {formData.includeNDPRCompliance &&\n \" This policy is compliant with the Nigeria Data Protection Regulation (NDPR) and the Data Protection Act (DPA).\"}\n </p>\n\n <h2>About Us</h2>\n <p>\n {formData.organizationName}\n {formData.organizationAddress &&\n ` is located at ${formData.organizationAddress}`}\n .\n {formData.organizationWebsite &&\n ` Our website is ${formData.organizationWebsite}.`}\n </p>\n\n <h2>Information We Collect</h2>\n <p>\n We collect and process your personal data for the following\n purposes:\n </p>\n <ul>\n {(formData.dataCollectionPurposes || []).map((purpose, index) => (\n <li key={`purpose-${index}`}>{purpose}</li>\n ))}\n </ul>\n\n <h2>Data Retention</h2>\n <p>\n We will retain your personal data for{\" \"}\n {formData.dataRetentionPeriod ||\n \"a period appropriate to the purpose\"}\n , or for as long as necessary to fulfill the purposes for which it\n was collected.\n </p>\n\n {formData.thirdPartySharing &&\n (formData.thirdParties || []).length > 0 && (\n <>\n <h2>Third-Party Sharing</h2>\n <p>\n We may share your personal information with the following\n third parties:\n </p>\n <ul>\n {(formData.thirdParties || []).map((party, index) => (\n <li key={`party-${index}`}>{party}</li>\n ))}\n </ul>\n </>\n )}\n\n {formData.cookiesUsed &&\n (formData.cookieTypes || []).length > 0 && (\n <>\n <h2>Cookies and Tracking Technologies</h2>\n <p>\n Our website uses cookies and similar tracking technologies.\n We use the following types of cookies:\n </p>\n <ul>\n {(formData.cookieTypes || []).map((type, index) => (\n <li key={`type-${index}`}>{type}</li>\n ))}\n </ul>\n </>\n )}\n\n {formData.internationalTransfers &&\n (formData.transferCountries || []).length > 0 && (\n <>\n <h2>International Data Transfers</h2>\n <p>\n We may transfer your personal data to the following\n countries outside Nigeria:\n </p>\n <ul>\n {(formData.transferCountries || []).map(\n (country, index) => (\n <li key={`country-${index}`}>{country}</li>\n ),\n )}\n </ul>\n <p>\n We ensure appropriate safeguards are in place to protect\n your data when transferred internationally.\n </p>\n </>\n )}\n\n {(formData.securityMeasures || []).length > 0 && (\n <>\n <h2>Security Measures</h2>\n <p>\n We implement the following security measures to protect your\n personal data:\n </p>\n <ul>\n {(formData.securityMeasures || []).map((measure, index) => (\n <li key={`measure-${index}`}>{measure}</li>\n ))}\n </ul>\n </>\n )}\n\n <h2>Your Rights</h2>\n <p>\n {formData.includeNDPRCompliance\n ? \"Under the NDPR and DPA, you have the following rights:\"\n : \"You have the following rights regarding your personal data:\"}\n </p>\n <ul>\n <li>Right to access your personal data</li>\n <li>Right to rectify inaccurate personal data</li>\n <li>Right to erasure ("right to be forgotten")</li>\n <li>Right to restrict processing</li>\n <li>Right to object to processing</li>\n <li>Right to data portability</li>\n </ul>\n <p>\n To exercise these rights, please contact us at{\" \"}\n {formData.organizationContact}.\n </p>\n\n {(formData.customSections || []).length > 0 &&\n (formData.customSections || []).map((section, index) => (\n <div key={`section-${index}`}>\n <h2>{section.title}</h2>\n <p>{section.content}</p>\n </div>\n ))}\n\n {formData.hasDPO && formData.dpoContact && (\n <>\n <h2>Data Protection Officer</h2>\n <p>\n You can contact our Data Protection Officer at{\" \"}\n {formData.dpoContact}.\n </p>\n </>\n )}\n\n <h2>Contact Us</h2>\n <p>\n If you have any questions about this Privacy Policy, please\n contact us at {formData.organizationContact}.\n </p>\n\n <p className=\"text-gray-500 dark:text-gray-400 mt-4\">\n Last Updated:{\" \"}\n {formData.policyEffectiveDate ||\n new Date().toISOString().split(\"T\")[0]}\n </p>\n </div>\n </CardContent>\n </Card>\n </div>\n );\n}\n","'use client';\n\nimport React from 'react';\n\ninterface StepIndicatorProps {\n currentStep: number;\n totalSteps: number;\n stepLabels: string[];\n}\n\nexport default function StepIndicator({ \n currentStep, \n totalSteps, \n stepLabels \n}: StepIndicatorProps) {\n return (\n <div className=\"mb-10\" role=\"navigation\" aria-label=\"Form progress\">\n <div className=\"flex items-center justify-between\">\n {Array.from({ length: totalSteps }).map((_, index) => {\n const stepNumber = index + 1;\n const isActive = stepNumber === currentStep;\n const isCompleted = stepNumber < currentStep;\n const isPending = stepNumber > currentStep;\n\n return (\n <div\n key={stepNumber}\n className={`flex items-center ${stepNumber < totalSteps ? 'w-full' : ''}`}\n >\n <div\n className={`\n flex items-center justify-center w-10 h-10 rounded-full text-sm font-medium\n transition-all duration-200 ease-in-out\n ${isActive ? 'bg-indigo-600 text-white ring-4 ring-indigo-100 dark:ring-indigo-900/30 scale-110' : ''}\n ${isCompleted ? 'bg-indigo-600 text-white' : ''}\n ${isPending ? 'bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400' : ''}\n `}\n aria-current={isActive ? 'step' : undefined}\n aria-label={`Step ${stepNumber}: ${stepLabels[index]}`}\n >\n {isCompleted ? (\n <svg xmlns=\"http://www.w3.org/2000/svg\" className=\"h-6 w-6\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" aria-hidden=\"true\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M5 13l4 4L19 7\" />\n </svg>\n ) : (\n stepNumber\n )}\n </div>\n {stepNumber < totalSteps && (\n <div\n className={`\n flex-1 h-1 mx-2 rounded-full\n transition-all duration-200 ease-in-out\n ${stepNumber < currentStep ? 'bg-indigo-600' : 'bg-gray-200 dark:bg-gray-700'}\n `}\n aria-hidden=\"true\"\n />\n )}\n </div>\n );\n })}\n </div>\n <div className=\"flex justify-between mt-3\">\n {stepLabels.map((label, index) => {\n const stepNumber = index + 1;\n const isActive = stepNumber === currentStep;\n const isCompleted = stepNumber < currentStep;\n\n return (\n <span \n key={index} \n className={`\n text-sm transition-colors duration-200 ease-in-out\n ${isActive ? 'text-indigo-600 dark:text-indigo-400 font-medium' : ''}\n ${isCompleted ? 'text-gray-700 dark:text-gray-300' : ''}\n ${!isActive && !isCompleted ? 'text-gray-500 dark:text-gray-400' : ''}\n `}\n >\n {label}\n </span>\n );\n })}\n </div>\n </div>\n );\n}\n","export const defaultDataPurposes = [\n 'Providing and maintaining our services',\n 'Processing transactions',\n 'Sending administrative information',\n 'Improving user experience',\n 'Marketing and promotional communications',\n 'Analytics and research',\n 'Legal compliance',\n 'Customer support',\n 'Personalization of content',\n 'Account management',\n];\n\nexport const defaultSecurityMeasures = [\n 'Encryption of sensitive data in transit and at rest',\n 'Multi-factor authentication for system access',\n 'Regular security assessments and penetration testing',\n 'Access controls with principle of least privilege',\n 'Data backup procedures with regular testing',\n 'Comprehensive staff training on data protection',\n 'Documented incident response plan with regular drills',\n 'Physical security measures including CCTV and access controls',\n 'Network security monitoring with intrusion detection',\n 'Vulnerability management and timely patching',\n 'Third-party security assessments for vendors',\n 'Data loss prevention (DLP) systems',\n 'Regular security audits and compliance checks',\n 'Secure development practices and code reviews',\n 'Privacy by design and default in all systems',\n 'Data minimization and pseudonymization where appropriate',\n 'Secure disposal of data and equipment',\n 'Endpoint protection and mobile device management',\n];\n\nexport const dataSubjectCategories = [\n 'Customers and clients',\n 'Employees and contractors',\n 'Job applicants',\n 'Suppliers and vendors',\n 'Website visitors and users',\n 'Marketing recipients',\n 'Business partners',\n 'Shareholders and investors',\n 'Children (under 18 years)',\n 'Vulnerable individuals',\n 'Patients (for healthcare organizations)',\n 'Students (for educational institutions)',\n 'Members (for membership organizations)',\n 'Beneficiaries (for charities/NGOs)',\n];\n\nexport const trackingTechnologies = [\n 'HTTP cookies',\n 'Web beacons and pixel tags',\n 'Local storage objects',\n 'Session replay tools',\n 'Device fingerprinting',\n 'IP address tracking',\n 'JavaScript trackers',\n 'Mobile app SDKs',\n 'Cross-device tracking',\n 'Social media widgets and buttons',\n 'Heatmaps and clicktracking',\n 'UTM parameters',\n 'Server logs',\n];\n\nexport const transferSafeguards = [\n 'Standard Contractual Clauses (SCCs)',\n 'Binding Corporate Rules (BCRs)',\n 'Adequacy decisions by the Nigerian Data Protection Commission',\n 'Data Processing Agreements with appropriate safeguards',\n 'Explicit consent of the data subject',\n 'Necessary for the performance of a contract',\n 'Necessary for important reasons of public interest',\n 'Necessary to protect vital interests',\n 'Transfer is from a register intended to provide information to the public',\n 'Compliance with NDPR Section 2.11 and 2.12 on international transfers',\n];\n\nexport const defaultCookieTypes = [\n 'Strictly necessary cookies',\n 'Functional cookies',\n 'Performance cookies',\n 'Targeting/advertising cookies',\n 'Social media cookies',\n];\n\nexport const commonTransferCountries = [\n 'United States',\n 'United Kingdom',\n 'European Union countries',\n 'Canada',\n 'Australia',\n 'India',\n 'South Africa',\n 'Kenya',\n];","\"use client\";\n\nimport React, { useState, useRef } from \"react\";\nimport { PolicySection } from \"@/types\";\nimport { jsPDF } from \"jspdf\";\nimport { escapeHtml } from \"@/lib/sanitize\";\n\n// Import step components\nimport OrganizationInfoStep from \"./steps/OrganizationInfoStep\";\nimport DataCollectionStep from \"./steps/DataCollectionStep\";\nimport DataSharingStep from \"./steps/DataSharingStep\";\nimport CustomSectionsStep from \"./steps/CustomSectionsStep\";\nimport PolicyPreviewStep from \"./steps/PolicyPreviewStep\";\n\n// Import shared components\nimport StepIndicator from \"./shared/StepIndicator\";\n\n// Import static data\nimport {\n defaultDataPurposes,\n defaultSecurityMeasures,\n dataSubjectCategories,\n trackingTechnologies,\n transferSafeguards,\n defaultCookieTypes,\n commonTransferCountries,\n} from \"./data\";\n\ninterface PolicyFormData {\n organizationName: string;\n organizationContact: string;\n organizationWebsite: string;\n organizationAddress: string;\n organizationType: string;\n industryCategory: string;\n registrationNumber: string;\n dataCollectionPurposes: string[];\n dataRetentionPeriod: string;\n legalBasisForProcessing: string[];\n dataCategories: string[];\n dataSubjects: string[];\n automatedDecisionMaking: boolean;\n automatedDecisionDetails: string;\n thirdPartySharing: boolean;\n thirdParties: string[];\n thirdPartyCategories: string[];\n thirdPartyPurposes: string[];\n securityMeasures: string[];\n dataBreachProcedures: string;\n regulatoryCompliance: string[];\n cookiesUsed: boolean;\n cookieTypes: string[];\n cookieLifespan: string;\n trackingTechnologies: string[];\n internationalTransfers: boolean;\n transferCountries: string[];\n transferSafeguards: string[];\n processesChildrenData: boolean;\n childrenDataDetails: string;\n processesSpecialCategories: boolean;\n specialCategoriesDetails: string;\n policyEffectiveDate: string;\n policyUpdateProcedure: string;\n policyVersion: string;\n previousPolicyUrl: string;\n dpoContact: string;\n hasDPO: boolean;\n supervisoryAuthorityContact: string;\n customSections: { title: string; content: string }[];\n includeNDPRCompliance: boolean;\n includeLegalReferences: boolean;\n includeExamples: boolean;\n}\n\n// Generate safe HTML from form data without using innerHTML\nfunction generateSafeHTMLFromFormData(formData: PolicyFormData): string {\n const sections: string[] = [];\n\n // Title\n sections.push(\n `<h1>${escapeHtml(formData.organizationName)} Privacy Policy</h1>`,\n );\n\n // Introduction\n sections.push(\"<h2>Introduction</h2>\");\n sections.push(\n `<p>This Privacy Policy describes how ${escapeHtml(formData.organizationName)} collects, uses, and discloses your personal information.${formData.includeNDPRCompliance ? \" This policy is compliant with the Nigeria Data Protection Regulation (NDPR) and the Data Protection Act (DPA).\" : \"\"}</p>`,\n );\n\n // About Us\n sections.push(\"<h2>About Us</h2>\");\n sections.push(\n `<p>${escapeHtml(formData.organizationName)}${formData.organizationAddress ? ` is located at ${escapeHtml(formData.organizationAddress)}` : \"\"}.${formData.organizationWebsite ? ` Our website is ${escapeHtml(formData.organizationWebsite)}.` : \"\"}</p>`,\n );\n\n // Information We Collect\n if (formData.dataCollectionPurposes?.length > 0) {\n sections.push(\"<h2>Information We Collect</h2>\");\n sections.push(\n \"<p>We collect and process your personal data for the following purposes:</p>\",\n );\n sections.push(\"<ul>\");\n formData.dataCollectionPurposes.forEach((purpose: string) => {\n sections.push(`<li>${escapeHtml(purpose)}</li>`);\n });\n sections.push(\"</ul>\");\n }\n\n // Data Retention\n sections.push(\"<h2>Data Retention</h2>\");\n sections.push(\n `<p>We will retain your personal data for ${escapeHtml(formData.dataRetentionPeriod || \"a period appropriate to the purpose\")}, or for as long as necessary to fulfill the purposes for which it was collected.</p>`,\n );\n\n // Third-Party Sharing\n if (formData.thirdPartySharing && formData.thirdParties?.length > 0) {\n sections.push(\"<h2>Third-Party Sharing</h2>\");\n sections.push(\n \"<p>We may share your personal information with the following third parties:</p>\",\n );\n sections.push(\"<ul>\");\n formData.thirdParties.forEach((party: string) => {\n sections.push(`<li>${escapeHtml(party)}</li>`);\n });\n sections.push(\"</ul>\");\n }\n\n // Cookies\n if (formData.cookiesUsed && formData.cookieTypes?.length > 0) {\n sections.push(\"<h2>Cookies and Tracking Technologies</h2>\");\n sections.push(\n \"<p>Our website uses cookies and similar tracking technologies. We use the following types of cookies:</p>\",\n );\n sections.push(\"<ul>\");\n formData.cookieTypes.forEach((type: string) => {\n sections.push(`<li>${escapeHtml(type)}</li>`);\n });\n sections.push(\"</ul>\");\n }\n\n // International Transfers\n if (\n formData.internationalTransfers &&\n formData.transferCountries?.length > 0\n ) {\n sections.push(\"<h2>International Data Transfers</h2>\");\n sections.push(\n \"<p>We may transfer your personal data to the following countries outside Nigeria:</p>\",\n );\n sections.push(\"<ul>\");\n formData.transferCountries.forEach((country: string) => {\n sections.push(`<li>${escapeHtml(country)}</li>`);\n });\n sections.push(\"</ul>\");\n sections.push(\n \"<p>We ensure appropriate safeguards are in place to protect your data when transferred internationally.</p>\",\n );\n }\n\n // Security Measures\n if (formData.securityMeasures?.length > 0) {\n sections.push(\"<h2>Security Measures</h2>\");\n sections.push(\n \"<p>We implement the following security measures to protect your personal data:</p>\",\n );\n sections.push(\"<ul>\");\n formData.securityMeasures.forEach((measure: string) => {\n sections.push(`<li>${escapeHtml(measure)}</li>`);\n });\n sections.push(\"</ul>\");\n }\n\n // Your Rights\n sections.push(\"<h2>Your Rights</h2>\");\n sections.push(\n `<p>${formData.includeNDPRCompliance ? \"Under the NDPR and DPA, you have the following rights:\" : \"You have the following rights regarding your personal data:\"}</p>`,\n );\n sections.push(\"<ul>\");\n sections.push(\"<li>Right to access your personal data</li>\");\n sections.push(\"<li>Right to rectify inaccurate personal data</li>\");\n sections.push('<li>Right to erasure (\"right to be forgotten\")</li>');\n sections.push(\"<li>Right to restrict processing</li>\");\n sections.push(\"<li>Right to object to processing</li>\");\n sections.push(\"<li>Right to data portability</li>\");\n sections.push(\"</ul>\");\n sections.push(\n `<p>To exercise these rights, please contact us at ${escapeHtml(formData.organizationContact)}.</p>`,\n );\n\n // Custom Sections\n if (formData.customSections?.length > 0) {\n formData.customSections.forEach((section) => {\n sections.push(`<h2>${escapeHtml(section.title)}</h2>`);\n sections.push(`<p>${escapeHtml(section.content)}</p>`);\n });\n }\n\n // DPO\n if (formData.hasDPO && formData.dpoContact) {\n sections.push(\"<h2>Data Protection Officer</h2>\");\n sections.push(\n `<p>You can contact our Data Protection Officer at ${escapeHtml(formData.dpoContact)}.</p>`,\n );\n }\n\n // Contact Us\n sections.push(\"<h2>Contact Us</h2>\");\n sections.push(\n `<p>If you have any questions about this Privacy Policy, please contact us at ${escapeHtml(formData.organizationContact)}.</p>`,\n );\n\n // Last Updated\n sections.push(\n `<p>Last Updated: ${escapeHtml(formData.policyEffectiveDate || new Date().toISOString().split(\"T\")[0])}</p>`,\n );\n\n return sections.join(\"\\n\");\n}\n\ninterface PolicyGeneratorProps {\n onGenerate: (policy: {\n organizationName: string;\n organizationContact: string;\n sections: PolicySection[];\n }) => void;\n className?: string;\n}\n\nexport default function PolicyGenerator({\n onGenerate,\n className = \"\",\n}: PolicyGeneratorProps) {\n const [step, setStep] = useState(1);\n const [formData, setFormData] = useState({\n // Organization Information\n organizationName: \"\",\n organizationContact: \"\",\n organizationWebsite: \"\",\n organizationAddress: \"\",\n organizationType: \"\", // New: Type of organization (e.g., e-commerce, healthcare, fintech)\n industryCategory: \"\", // New: Industry category for contextual examples\n registrationNumber: \"\", // New: Business registration number\n\n // Data Processing Information\n dataCollectionPurposes: [] as string[],\n dataRetentionPeriod: \"\",\n legalBasisForProcessing: [] as string[], // New: Legal basis under NDPR/DPA\n dataCategories: [] as string[], // New: Categories of personal data collected\n dataSubjects: [] as string[], // New: Categories of data subjects\n automatedDecisionMaking: false, // New: Whether automated decision-making is used\n automatedDecisionDetails: \"\", // New: Details about automated decision-making\n\n // Data Sharing Information\n thirdPartySharing: false,\n thirdParties: [] as string[],\n thirdPartyCategories: [] as string[], // New: Categories of third parties\n thirdPartyPurposes: [] as string[], // New: Purposes of third-party sharing\n\n // Security and Compliance\n securityMeasures: [] as string[],\n dataBreachProcedures: \"\", // New: Data breach notification procedures\n regulatoryCompliance: [] as string[], // New: Additional regulations complied with\n\n // Cookies and Tracking\n cookiesUsed: false,\n cookieTypes: [] as string[],\n cookieLifespan: \"\", // New: Cookie lifespan information\n trackingTechnologies: [] as string[], // New: Other tracking technologies used\n\n // International Transfers\n internationalTransfers: false,\n transferCountries: [] as string[],\n transferSafeguards: [] as string[], // New: Safeguards for international transfers\n\n // Special Categories\n processesChildrenData: false, // New: Whether children's data is processed\n childrenDataDetails: \"\", // New: Details about children's data processing\n processesSpecialCategories: false, // New: Whether special category data is processed\n specialCategoriesDetails: \"\", // New: Details about special category data\n\n // Policy Management\n policyEffectiveDate: new Date().toISOString().split(\"T\")[0], // New: Policy effective date\n policyUpdateProcedure: \"\", // New: How policy updates are communicated\n policyVersion: \"1.0\", // New: Policy version number\n previousPolicyUrl: \"\", // New: Link to previous policy version\n\n // Contact Information\n dpoContact: \"\",\n hasDPO: false,\n supervisoryAuthorityContact: \"\", // New: Contact for supervisory authority\n\n // Customization\n customSections: [] as { title: string; content: string }[],\n includeNDPRCompliance: true,\n includeLegalReferences: true, // Whether to include specific legal references\n includeExamples: true, // Whether to include industry-specific examples\n });\n\n const [errors, setErrors] = useState<Record<string, string>>({});\n const previewRef = useRef<HTMLDivElement>(null);\n\n // Handle form field changes\n const handleChange = (\n e: React.ChangeEvent<\n HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement\n >,\n ) => {\n const { name, value, type } = e.target as HTMLInputElement;\n\n if (type === \"checkbox\") {\n setFormData((prev) => ({\n ...prev,\n [name]: (e.target as HTMLInputElement).checked,\n }));\n } else {\n setFormData((prev) => ({\n ...prev,\n [name]: value,\n }));\n }\n\n // Clear error when field is edited\n if (errors[name]) {\n setErrors((prev) => {\n const newErrors = { ...prev };\n delete newErrors[name];\n return newErrors;\n });\n }\n };\n\n // Handle checkbox group selections\n const handleMultiSelect = (\n category:\n | \"dataCollectionPurposes\"\n | \"securityMeasures\"\n | \"cookieTypes\"\n | \"transferCountries\"\n | \"dataSubjects\"\n | \"dataCategories\"\n | \"legalBasisForProcessing\"\n | \"thirdPartyCategories\"\n | \"thirdPartyPurposes\"\n | \"trackingTechnologies\"\n | \"transferSafeguards\"\n | \"regulatoryCompliance\",\n item: string,\n ) => {\n setFormData((prev) => {\n const currentItems = [...prev[category]];\n if (currentItems.includes(item)) {\n return {\n ...prev,\n [category]: currentItems.filter((i) => i !== item),\n };\n } else {\n return {\n ...prev,\n [category]: [...currentItems, item],\n };\n }\n });\n };\n\n // Add a third party to the list\n const handleAddThirdParty = () => {\n const thirdPartyInput = document.getElementById(\n \"thirdPartyInput\",\n ) as HTMLInputElement;\n if (thirdPartyInput && thirdPartyInput.value.trim()) {\n setFormData((prev) => ({\n ...prev,\n thirdParties: [...prev.thirdParties, thirdPartyInput.value.trim()],\n }));\n thirdPartyInput.value = \"\";\n }\n };\n\n // Remove a third party from the list\n const handleRemoveThirdParty = (index: number) => {\n setFormData((prev) => ({\n ...prev,\n thirdParties: prev.thirdParties.filter((_, i) => i !== index),\n }));\n };\n\n // Add a custom section to the policy\n const handleAddCustomSection = (title: string, content: string) => {\n if (title.trim() && content.trim()) {\n setFormData((prev) => ({\n ...prev,\n customSections: [\n ...prev.customSections,\n { title: title.trim(), content: content.trim() },\n ],\n }));\n }\n };\n\n // Remove a custom section from the policy\n const handleRemoveCustomSection = (index: number) => {\n setFormData((prev) => ({\n ...prev,\n customSections: prev.customSections.filter((_, i) => i !== index),\n }));\n };\n\n // Validate each step of the form with enhanced validation\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const validateStep = (_step: number) => {\n // Clear any existing errors\n setErrors({});\n\n // Always return true to allow navigation through all steps\n return true;\n };\n\n // Move to the next step if validation passes\n const handleNext = () => {\n if (validateStep(step)) {\n setStep((prev) => prev + 1);\n }\n };\n\n // Move to the previous step\n const handleBack = () => {\n setStep((prev) => prev - 1);\n };\n\n // These handler functions have been moved to the final policy page\n // but are kept here for reference and to avoid TypeScript errors\n // The underscore prefix indicates they're unused\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const _handleCopyPolicy = () => {\n if (previewRef.current) {\n const policyText = previewRef.current.innerText;\n navigator.clipboard\n .writeText(policyText)\n .then(() => {\n alert(\"Privacy policy copied to clipboard!\");\n })\n .catch((err) => {\n console.error(\"Failed to copy text: \", err);\n alert(\"Failed to copy text. Please try again.\");\n });\n }\n };\n\n // Share policy via email\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const _handleSharePolicy = () => {\n if (previewRef.current) {\n const subject = `${formData.organizationName} - Privacy Policy`;\n const body = previewRef.current.innerText;\n const mailtoLink = `mailto:?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}`;\n window.open(mailtoLink);\n }\n };\n\n // Download policy in different formats\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const _handleDownloadPolicy = async (\n format: \"txt\" | \"html\" | \"md\" | \"pdf\" | \"rtf\",\n ) => {\n if (previewRef.current) {\n let content = \"\";\n let mimeType = \"\";\n let fileExtension = \"\";\n let blob: Blob | null = null;\n\n const policyText = previewRef.current.innerText;\n // Instead of using innerHTML directly, we'll generate safe HTML from the form data\n const policyHTML = generateSafeHTMLFromFormData(formData);\n const policyTitle = `${formData.organizationName} Privacy Policy`;\n const fileName = `${formData.organizationName.replace(/\\s+/g, \"-\").toLowerCase()}-privacy-policy`;\n\n // Convert policy to markdown\n const convertToMarkdown = (html: string): string => {\n // Simple HTML to Markdown conversion\n let md = html\n .replace(/<h1>(.*?)<\\/h1>/g, \"# $1\\n\\n\")\n .replace(/<h2>(.*?)<\\/h2>/g, \"## $1\\n\\n\")\n .replace(/<h3>(.*?)<\\/h3>/g, \"### $1\\n\\n\")\n .replace(/<p>(.*?)<\\/p>/g, \"$1\\n\\n\")\n .replace(/<strong>(.*?)<\\/strong>/g, \"**$1**\")\n .replace(/<em>(.*?)<\\/em>/g, \"*$1*\")\n .replace(/<ul>(.*?)<\\/ul>/g, \"$1\\n\")\n .replace(/<li>(.*?)<\\/li>/g, \"- $1\\n\")\n .replace(/<br\\s*\\/?>/g, \"\\n\")\n .replace(/ /g, \" \");\n\n // Remove any remaining HTML tags\n md = md.replace(/<[^>]*>/g, \"\");\n\n return md;\n };\n\n try {\n switch (format) {\n case \"pdf\":\n // Create PDF using jsPDF\n const pdf = new jsPDF({\n orientation: \"portrait\",\n unit: \"mm\",\n format: \"a4\",\n });\n\n // Add title\n pdf.setFontSize(16);\n pdf.text(policyTitle, 20, 20);\n pdf.setFontSize(12);\n\n // Split text into lines to fit on PDF page\n const textLines = pdf.splitTextToSize(policyText, 170);\n pdf.text(textLines, 20, 30);\n\n // Get PDF as blob\n blob = pdf.output(\"blob\");\n mimeType = \"application/pdf\";\n fileExtension = \"pdf\";\n break;\n\n case \"rtf\":\n // For DOCX, we'll create a simple text file with .docx extension\n // This is a workaround since browser-based DOCX generation is limited\n content = policyText;\n mimeType =\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\";\n fileExtension = \"rtf\";\n blob = new Blob([content], { type: mimeType });\n break;\n\n case \"html\":\n content = policyHTML;\n mimeType = \"text/html\";\n fileExtension = \"html\";\n blob = new Blob([content], { type: mimeType });\n break;\n\n case \"md\":\n content = convertToMarkdown(policyHTML);\n mimeType = \"text/markdown\";\n fileExtension = \"md\";\n blob = new Blob([content], { type: mimeType });\n break;\n\n case \"txt\":\n default:\n content = policyText;\n mimeType = \"text/plain\";\n fileExtension = \"txt\";\n blob = new Blob([content], { type: mimeType });\n break;\n }\n\n if (blob) {\n const url = URL.createObjectURL(blob);\n const a = document.createElement(\"a\");\n a.href = url;\n a.download = `${fileName}.${fileExtension}`;\n document.body.appendChild(a);\n a.click();\n document.body.removeChild(a);\n URL.revokeObjectURL(url);\n }\n } catch (error) {\n console.error(\"Error generating document:\", error);\n alert(\"There was an error generating your document. Please try again.\");\n }\n }\n };\n\n // Generate the final privacy policy and pass it to the parent component\n const handleGenerate = () => {\n if (!validateStep(step)) return;\n\n // Create policy sections\n const sections: PolicySection[] = [\n {\n id: \"introduction\",\n title: \"Introduction\",\n content: `This Privacy Policy (\"Policy\") describes how ${formData.organizationName} (\"we\", \"us\", or \"our\") collects, uses, and discloses your personal information when you visit our website${formData.organizationWebsite ? ` at ${formData.organizationWebsite}` : \"\"}, use our services, or otherwise interact with us. This Policy applies to all personal data processed by us, regardless of the media on which it is stored. ${formData.includeNDPRCompliance ? `This Policy is designed to comply with the Nigeria Data Protection Regulation (NDPR) ${formData.includeLegalReferences ? \"of 2019 \" : \"\"}and the Data Protection Act (DPA) ${formData.includeLegalReferences ? \"of 2023 \" : \"\"}and reflects our commitment to the principles of data protection as outlined in ${formData.includeLegalReferences ? \"Section 2.1(1) of the NDPR and Section 2 of the DPA\" : \"the applicable regulations\"}.` : \"\"} Please read this Policy carefully to understand our practices regarding your personal data and how we will treat it.`,\n required: true,\n included: true,\n order: 1,\n },\n {\n id: \"about-us\",\n title: \"About Us\",\n content: `${formData.organizationName} ${formData.organizationType ? `is a ${formData.organizationType} operating in the ${formData.industryCategory} sector` : \"\"}${formData.registrationNumber ? `, registered with registration number ${formData.registrationNumber}` : \"\"}${formData.organizationAddress ? `, and located at ${formData.organizationAddress}` : \"\"}. ${formData.organizationWebsite ? `Our official website is ${formData.organizationWebsite}.` : \"\"} ${formData.includeNDPRCompliance ? `As a data controller under the NDPR and DPA, we are responsible for deciding how we hold and use personal information about you.` : \"\"}`,\n required: true,\n included: true,\n order: 2,\n },\n {\n id: \"definitions\",\n title: \"Definitions\",\n content: `${formData.includeNDPRCompliance ? `For the purposes of this Policy and in accordance with the NDPR and DPA:\\n\\n- \"Personal Data\" means any information relating to an identified or identifiable natural person ('data subject'); an identifiable natural person is one who can be identified, directly or indirectly, in particular by reference to an identifier.\\n- \"Processing\" means any operation or set of operations performed on personal data or on sets of personal data.\\n- \"Data Controller\" means a person who either alone, jointly with other persons or in common with other persons or as a statutory body determines the purposes for and the manner in which personal data is processed or is to be processed.\\n- \"Data Subject\" means any person, who can be identified, directly or indirectly, by reference to an identification number or to one or more factors specific to his physical, physiological, mental, economic, cultural or social identity.\\n- \"Consent\" means any freely given, specific, informed and unambiguous indication of the data subject's wishes by which he or she, through a statement or a clear affirmative action, signifies agreement to the processing of personal data relating to him or her.` : `For the purposes of this Policy:\\n\\n- \"Personal Data\" means any information relating to an identified or identifiable individual.\\n- \"Processing\" means any operation performed on personal data.\\n- \"Data Subject\" means the individual to whom the personal data relates.`}`,\n required: true,\n included: true,\n order: 3,\n },\n ];\n\n let order = 4;\n\n // Add data categories section\n if (formData.dataCategories.length > 0) {\n sections.push({\n id: \"data-categories\",\n title: \"Categories of Personal Data We Collect\",\n content: `We collect and process the following categories of personal data:\\n\\n${formData.dataCategories.map((category) => `- ${category}`).join(\"\\n\")}${formData.includeExamples ? `\\n\\n${getIndustrySpecificDataExample(formData.industryCategory)}` : \"\"}`,\n required: true,\n included: true,\n order: order++,\n });\n }\n\n // Add data subjects section\n if (formData.dataSubjects.length > 0) {\n sections.push({\n id: \"data-subjects\",\n title: \"Categories of Data Subjects\",\n content: `This Policy applies to personal data we collect from the following categories of individuals:\\n\\n${formData.dataSubjects.map((subject) => `- ${subject}`).join(\"\\n\")}`,\n required: true,\n included: true,\n order: order++,\n });\n }\n\n // Add data collection purposes section\n sections.push({\n id: \"data-collection-purposes\",\n title: \"Purposes of Data Collection and Processing\",\n content: `We collect and process your personal data for the following specific purposes:\\n\\n${formData.dataCollectionPurposes.map((purpose) => `- ${purpose}`).join(\"\\n\")}${formData.includeExamples ? `\\n\\n${getIndustrySpecificPurposeExample(formData.industryCategory)}` : \"\"}`,\n required: true,\n included: true,\n order: order++,\n });\n\n if (formData.legalBasisForProcessing.length > 0) {\n sections.push({\n id: \"legal-basis\",\n title: \"Legal Basis for Processing\",\n content: `${formData.includeNDPRCompliance ? `In accordance with ${formData.includeLegalReferences ? \"Section 2.2 of the NDPR and Section 27 of the DPA\" : \"the NDPR and DPA\"}, we process your personal data on the following legal grounds:` : \"We process your personal data on the following legal grounds:\"}\\n\\n${formData.legalBasisForProcessing.map((basis) => `- ${basis}`).join(\"\\n\")}`,\n required: true,\n included: true,\n order: order++,\n });\n }\n\n if (formData.automatedDecisionMaking) {\n sections.push({\n id: \"automated-decision-making\",\n title: \"Automated Decision-Making and Profiling\",\n content: `We use automated decision-making processes, including profiling, in the following circumstances:\\n\\n${formData.automatedDecisionDetails}\\n\\n${formData.includeNDPRCompliance ? `In accordance with ${formData.includeLegalReferences ? \"Section 2.3(1)(c) of the NDPR and Section 41 of the DPA\" : \"the NDPR and DPA\"}, you have the right not to be subject to a decision based solely on automated processing, including profiling, which produces legal effects concerning you or similarly significantly affects you. You can exercise this right by contacting us at ${formData.organizationContact}.` : \"You have the right not to be subject to a decision based solely on automated processing. You can exercise this right by contacting us.\"}`,\n required: false,\n included: true,\n order: order++,\n });\n }\n\n // Add data retention section\n sections.push({\n id: \"data-retention\",\n title: \"Data Retention\",\n content: `We will retain your personal data for ${formData.dataRetentionPeriod}, or for as long as necessary to fulfill the purposes for which it was collected, including for the purposes of satisfying any legal, accounting, or reporting requirements. ${formData.includeNDPRCompliance ? `This is in accordance with ${formData.includeLegalReferences ? \"Section 2.1(1)(e) of the NDPR and Section 33 of the DPA\" : \"the data retention principles of the NDPR and DPA\"}.` : \"\"}\\n\\nTo determine the appropriate retention period for personal data, we consider the amount, nature, and sensitivity of the personal data, the potential risk of harm from unauthorized use or disclosure of your personal data, the purposes for which we process your personal data and whether we can achieve those purposes through other means, and the applicable legal requirements.`,\n required: true,\n included: true,\n order: order++,\n });\n\n // Add third-party sharing section if applicable\n if (formData.thirdPartySharing) {\n let thirdPartyContent =\n \"We may share your personal information with the following categories of recipients:\";\n\n if (formData.thirdPartyCategories.length > 0) {\n thirdPartyContent += `\\n\\nCategories of third parties:\\n${formData.thirdPartyCategories.map((category) => `- ${category}`).join(\"\\n\")}`;\n }\n\n if (formData.thirdParties.length > 0) {\n thirdPartyContent += `\\n\\nSpecific third parties:\\n${formData.thirdParties.map((party) => `- ${party}`).join(\"\\n\")}`;\n }\n\n if (formData.thirdPartyPurposes.length > 0) {\n thirdPartyContent += `\\n\\nWe share your personal data with these third parties for the following purposes:\\n${formData.thirdPartyPurposes.map((purpose) => `- ${purpose}`).join(\"\\n\")}`;\n }\n\n thirdPartyContent += `\\n\\n${formData.includeNDPRCompliance ? `In accordance with ${formData.includeLegalReferences ? \"Section 2.6 of the NDPR and Section 37 of the DPA\" : \"the NDPR and DPA\"}, we require all third parties to respect the security of your personal data and to treat it in accordance with the law. We do not allow our third-party service providers to use your personal data for their own purposes and only permit them to process your personal data for specified purposes and in accordance with our instructions.` : \"We require all third parties to respect the security of your personal data and to treat it in accordance with applicable law.\"}`;\n\n sections.push({\n id: \"third-party-sharing\",\n title: \"Third-Party Sharing\",\n content: thirdPartyContent,\n required: false,\n included: true,\n order: order++,\n });\n }\n\n // Add cookies section if applicable\n if (formData.cookiesUsed) {\n let cookieContent = `Our website uses cookies and similar tracking technologies to distinguish you from other users of our website. This helps us to provide you with a good experience when you browse our website and also allows us to improve our site.`;\n\n if (formData.cookieTypes.length > 0) {\n cookieContent += `\\n\\nWe use the following types of cookies:\\n${formData.cookieTypes.map((type) => `- ${type}`).join(\"\\n\")}`;\n }\n\n if (formData.cookieLifespan) {\n cookieContent += `\\n\\nCookie Lifespan: ${formData.cookieLifespan}`;\n }\n\n if (formData.trackingTechnologies.length > 0) {\n cookieContent += `\\n\\nIn addition to cookies, we also use the following tracking technologies:\\n${formData.trackingTechnologies.map((tech) => `- ${tech}`).join(\"\\n\")}`;\n }\n\n cookieContent += `\\n\\nYou can set your browser to refuse all or some browser cookies, or to alert you when websites set or access cookies. If you disable or refuse cookies, please note that some parts of this website may become inaccessible or not function properly.`;\n\n sections.push({\n id: \"cookies\",\n title: \"Cookies and Tracking Technologies\",\n content: cookieContent,\n required: false,\n included: true,\n order: order++,\n });\n }\n\n // Add international transfers section if applicable\n if (formData.internationalTransfers) {\n let transferContent = `We may transfer your personal data to countries outside Nigeria. These countries may include: ${formData.transferCountries.join(\", \")}.`;\n\n if (formData.transferSafeguards.length > 0) {\n transferContent += `\\n\\nWhenever we transfer your personal data out of Nigeria, we ensure a similar degree of protection is afforded to it by implementing the following safeguards:\\n${formData.transferSafeguards.map((safeguard) => `- ${safeguard}`).join(\"\\n\")}`;\n }\n\n transferContent += `\\n\\n${formData.includeNDPRCompliance ? `In accordance with ${formData.includeLegalReferences ? \"Sections 2.11 and 2.12 of the NDPR and Section 44 of the DPA\" : \"the NDPR and DPA\"}, we ensure that any international transfer of personal data is done in accordance with the provisions of the regulations and that adequate protection is guaranteed for the rights of data subjects.` : \"We ensure that any international transfer of personal data is done with adequate protection for the rights of data subjects.\"}`;\n\n sections.push({\n id: \"international-transfers\",\n title: \"International Data Transfers\",\n content: transferContent,\n required: false,\n included: true,\n order: order++,\n });\n }\n\n // Add children's data section if applicable\n if (formData.processesChildrenData) {\n sections.push({\n id: \"childrens-data\",\n title: \"Children's Privacy\",\n content: `Our services may be used by individuals under the age of 18. ${formData.childrenDataDetails}\\n\\n${formData.includeNDPRCompliance ? `In accordance with ${formData.includeLegalReferences ? \"Section 2.2(d) of the NDPR and Section 39 of the DPA\" : \"the NDPR and DPA\"}, we implement specific measures to protect the privacy of children, including obtaining parental consent where required by law.` : \"We implement specific measures to protect the privacy of children, including obtaining parental consent where required by law.\"}`,\n required: false,\n included: true,\n order: order++,\n });\n }\n\n // Add special categories section if applicable\n if (formData.processesSpecialCategories) {\n sections.push({\n id: \"special-categories\",\n title: \"Special Categories of Personal Data\",\n content: `We may process special categories of personal data, which includes information about your race, ethnic origin, political opinions, religious or philosophical beliefs, trade union membership, genetic data, biometric data, health data, sex life, or sexual orientation.\\n\\n${formData.specialCategoriesDetails}\\n\\n${formData.includeNDPRCompliance ? `In accordance with ${formData.includeLegalReferences ? \"Section 2.2 of the NDPR and Section 28 of the DPA\" : \"the NDPR and DPA\"}, we only process special categories of personal data when one of the specific legal bases for such processing is met, such as explicit consent or when processing is necessary for specific purposes outlined in the regulations.` : \"We only process special categories of personal data when one of the specific legal bases for such processing is met, such as explicit consent.\"}`,\n required: false,\n included: true,\n order: order++,\n });\n }\n\n // Add security measures section\n if (formData.securityMeasures.length > 0) {\n let securityContent = `We have implemented appropriate security measures to prevent your personal data from being accidentally lost, used, or accessed in an unauthorized way, altered, or disclosed. These measures include:\\n\\n${formData.securityMeasures.map((measure) => `- ${measure}`).join(\"\\n\")}\\n\\n${formData.includeNDPRCompliance ? `In accordance with ${formData.includeLegalReferences ? \"Section 2.1(1)(d) of the NDPR and Section 31 of the DPA\" : \"the NDPR and DPA\"}, we implement appropriate technical and organizational measures to ensure a level of security appropriate to the risk.` : \"We regularly review and update our security measures to ensure the ongoing confidentiality, integrity, and availability of your personal data.\"}`;\n\n if (formData.dataBreachProcedures) {\n securityContent += `\\n\\nData Breach Procedures: ${formData.dataBreachProcedures}`;\n }\n\n sections.push({\n id: \"security-measures\",\n title: \"Data Security\",\n content: securityContent,\n required: true,\n included: true,\n order: order++,\n });\n }\n\n // Add data subject rights section\n const rightsContent = `${formData.includeNDPRCompliance ? `In accordance with ${formData.includeLegalReferences ? \"Section 3.1 of the NDPR and Section 36 of the DPA\" : \"the NDPR and DPA\"}, you have the following rights in relation to your personal data:` : \"You have the following rights in relation to your personal data:\"}\\n\\n- **Right to Access**: You have the right to request a copy of the personal data we hold about you.\\n- **Right to Rectification**: You have the right to request correction of any inaccurate personal data we hold about you.\\n- **Right to Erasure (Right to be Forgotten)**: You have the right to request erasure of your personal data in certain circumstances.\\n- **Right to Restriction of Processing**: You have the right to request restriction of processing of your personal data in certain circumstances.\\n- **Right to Data Portability**: You have the right to request the transfer of your personal data to you or to a third party in a structured, commonly used, machine-readable format.\\n- **Right to Object**: You have the right to object to processing of your personal data in certain circumstances.\\n- **Right to Withdraw Consent**: Where we rely on your consent to process your personal data, you have the right to withdraw your consent at any time.\\n\\nTo exercise any of these rights, please contact us at ${formData.organizationContact}.${formData.includeNDPRCompliance ? ` We will respond to your request within ${formData.includeLegalReferences ? \"30 days as required by Section 3.1(7) of the NDPR\" : \"the timeframe specified by the regulations\"}.` : \"\"}`;\n\n sections.push({\n id: \"data-subject-rights\",\n title: \"Your Rights\",\n content: rightsContent,\n required: true,\n included: true,\n order: order++,\n });\n\n // Add policy updates section\n sections.push({\n id: \"policy-updates\",\n title: \"Changes to This Privacy Policy\",\n content: `We may update this Privacy Policy from time to time. The current version of the Privacy Policy is effective as of ${formData.policyEffectiveDate} (Version ${formData.policyVersion}).${formData.previousPolicyUrl ? ` Previous versions of this Policy can be found at ${formData.previousPolicyUrl}.` : \"\"}\\n\\n${formData.policyUpdateProcedure ? `When we make changes to this Privacy Policy: ${formData.policyUpdateProcedure}` : \"We will notify you of any material changes to this Privacy Policy by posting the updated Policy on our website and, where appropriate, by sending you a notification.\"}`,\n required: true,\n included: true,\n order: order++,\n });\n\n // Add regulatory compliance section if applicable\n if (formData.regulatoryCompliance.length > 0) {\n sections.push({\n id: \"regulatory-compliance\",\n title: \"Regulatory Compliance\",\n content: `In addition to the ${formData.includeNDPRCompliance ? \"NDPR and DPA\" : \"applicable data protection laws\"}, we comply with the following regulations and standards:\\n\\n${formData.regulatoryCompliance.map((reg) => `- ${reg}`).join(\"\\n\")}`,\n required: false,\n included: true,\n order: order++,\n });\n }\n\n // Add custom sections\n formData.customSections.forEach((section, index) => {\n sections.push({\n id: `custom-${index}`,\n title: section.title,\n content: section.content,\n required: false,\n included: true,\n order: order++,\n });\n });\n\n // Add DPO section if applicable\n if (formData.hasDPO && formData.dpoContact) {\n sections.push({\n id: \"dpo\",\n title: \"Data Protection Officer\",\n content: `We have appointed a Data Protection Officer (DPO) who is responsible for overseeing questions in relation to this Privacy Policy. You can contact our DPO at ${formData.dpoContact}.${formData.includeNDPRCompliance ? ` This appointment is in accordance with ${formData.includeLegalReferences ? \"Section 2.5 of the NDPR and Section 30 of the DPA\" : \"the requirements of the NDPR and DPA\"}.` : \"\"}`,\n required: false,\n included: true,\n order: order++,\n });\n }\n\n // Add supervisory authority section if applicable\n if (formData.supervisoryAuthorityContact) {\n sections.push({\n id: \"supervisory-authority\",\n title: \"Supervisory Authority\",\n content: `${formData.includeNDPRCompliance ? `In accordance with ${formData.includeLegalReferences ? \"Section 3.1(8) of the NDPR and Section 36(5) of the DPA\" : \"the NDPR and DPA\"}, you have the right to lodge a complaint with the Nigeria Data Protection Commission (NDPC) if you are not satisfied with our response to your concerns. You can contact the NDPC at ${formData.supervisoryAuthorityContact}.` : `You have the right to lodge a complaint with the relevant data protection authority if you are not satisfied with our response to your concerns. You can contact them at ${formData.supervisoryAuthorityContact}.`}`,\n required: false,\n included: true,\n order: order++,\n });\n }\n\n // Add contact section\n sections.push({\n id: \"contact\",\n title: \"Contact Us\",\n content: `If you have any questions about this Privacy Policy or our privacy practices, please contact us at:\\n\\n${formData.organizationName}\\n${formData.organizationAddress ? `${formData.organizationAddress}\\n` : \"\"}Email: ${formData.organizationContact}\\n${formData.organizationWebsite ? `Website: ${formData.organizationWebsite}` : \"\"}`,\n required: true,\n included: true,\n order: order++,\n });\n\n // Pass the generated policy to the parent component\n onGenerate({\n organizationName: formData.organizationName,\n organizationContact: formData.organizationContact,\n sections,\n });\n };\n\n // Helper function to get industry-specific examples for data collection\n const getIndustrySpecificDataExample = (industry: string): string => {\n switch (industry) {\n case \"E-commerce and retail\":\n return \"For example, we collect your name, shipping address, and payment information when you place an order on our website.\";\n case \"Financial services and fintech\":\n return \"For example, we collect your financial information, transaction history, and credit information to provide our financial services.\";\n case \"Healthcare and medical\":\n return \"For example, we collect your medical history, treatment information, and health insurance details to provide healthcare services.\";\n case \"Education and e-learning\":\n return \"For example, we collect your educational background, course progress, and assessment results to provide educational services.\";\n default:\n return \"For example, we collect information necessary to provide our services and ensure a personalized experience.\";\n }\n };\n\n // Helper function to get industry-specific examples for purposes\n const getIndustrySpecificPurposeExample = (industry: string): string => {\n switch (industry) {\n case \"E-commerce and retail\":\n return \"For example, we use your shipping address to deliver products you order and your payment information to process transactions.\";\n case \"Financial services and fintech\":\n return \"For example, we use your financial information to process transactions and your credit information for credit assessments.\";\n case \"Healthcare and medical\":\n return \"For example, we use your medical history to provide appropriate healthcare services and treatment recommendations.\";\n case \"Education and e-learning\":\n return \"For example, we use your course progress data to personalize your learning experience and provide appropriate educational content.\";\n default:\n return \"For example, we use your information to provide our services, improve your experience, and ensure compliance with applicable laws.\";\n }\n };\n\n // Step labels for the progress indicator\n const stepLabels = [\n \"Organization Info\",\n \"Data Collection\",\n \"Data Sharing\",\n \"Finalize\",\n ];\n\n return (\n <div\n className={`bg-white dark:bg-gray-900 shadow-lg rounded-xl p-8 max-w-4xl mx-auto ${className}`}\n >\n <h2 className=\"text-2xl font-bold text-gray-900 dark:text-white mb-8 text-center\">\n Privacy Policy Generator\n </h2>\n\n <StepIndicator\n currentStep={step}\n totalSteps={4}\n stepLabels={stepLabels}\n />\n\n {/* Step 1: Organization Information */}\n {step === 1 && (\n <OrganizationInfoStep\n formData={formData}\n errors={errors}\n onChange={handleChange}\n />\n )}\n\n {/* Step 2: Data Collection */}\n {step === 2 && (\n <DataCollectionStep\n formData={formData}\n errors={errors}\n onChange={handleChange}\n onToggleItem={handleMultiSelect}\n defaultDataPurposes={defaultDataPurposes}\n defaultSecurityMeasures={defaultSecurityMeasures}\n dataSubjectCategories={dataSubjectCategories}\n />\n )}\n\n {/* Step 3: Data Sharing */}\n {step === 3 && (\n <DataSharingStep\n formData={formData}\n errors={errors}\n onChange={handleChange}\n onToggleItem={handleMultiSelect}\n onAddThirdParty={handleAddThirdParty}\n onRemoveThirdParty={handleRemoveThirdParty}\n defaultCookieTypes={defaultCookieTypes}\n commonTransferCountries={commonTransferCountries}\n trackingTechnologies={trackingTechnologies}\n transferSafeguards={transferSafeguards}\n />\n )}\n\n {/* Step 4: Custom Sections and Preview */}\n {step === 4 && (\n <div className=\"space-y-8\">\n <CustomSectionsStep\n formData={formData}\n onAddCustomSection={handleAddCustomSection}\n onRemoveCustomSection={handleRemoveCustomSection}\n />\n\n <PolicyPreviewStep formData={formData} previewRef={previewRef} />\n </div>\n )}\n\n <div className=\"mt-10 flex justify-between items-center\">\n {step > 1 ? (\n <button\n type=\"button\"\n onClick={handleBack}\n className=\"inline-flex items-center px-5 py-2.5 border border-gray-300 dark:border-gray-600 shadow-sm text-sm font-medium rounded-lg text-gray-700 dark:text-gray-200 bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 transition-colors duration-200 ease-in-out\"\n aria-label=\"Go back to previous step\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"h-5 w-5 mr-2\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z\"\n clipRule=\"evenodd\"\n />\n </svg>\n Back\n </button>\n ) : (\n <div>\n {/* Empty div to maintain layout when back button is not shown */}\n </div>\n )}\n\n {step < 4 ? (\n <button\n type=\"button\"\n onClick={handleNext}\n className=\"inline-flex items-center px-5 py-2.5 border border-transparent shadow-sm text-sm font-medium rounded-lg text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 transition-colors duration-200 ease-in-out\"\n aria-label=\"Proceed to next step\"\n >\n Next\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"h-5 w-5 ml-2\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z\"\n clipRule=\"evenodd\"\n />\n </svg>\n </button>\n ) : (\n <button\n type=\"button\"\n onClick={handleGenerate}\n className=\"inline-flex items-center px-5 py-2.5 border border-transparent shadow-sm text-sm font-medium rounded-lg text-white bg-gradient-to-r from-green-500 to-emerald-600 hover:from-green-600 hover:to-emerald-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500 transition-all duration-200 ease-in-out\"\n aria-label=\"Generate privacy policy\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"h-5 w-5 mr-2\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z\"\n clipRule=\"evenodd\"\n />\n </svg>\n Generate Policy\n </button>\n )}\n </div>\n </div>\n );\n}\n","// Core exports\nexport {\n ConsentProvider,\n useConsent,\n ConsentContext,\n} from \"./contexts/ConsentContext\";\nexport type {\n ConsentCategories,\n ConsentState,\n ConsentActions,\n ConsentContextValue,\n} from \"./contexts/ConsentContext\";\n\n// Generic consent context factory\nexport { createConsentContext } from \"./contexts/GenericConsentContext\";\nexport type {\n BaseConsentCategories,\n DefaultConsentCategories,\n ConsentProviderProps,\n} from \"./types/consent\";\n\n// Components\nexport { ConsentManager } from \"./components/consent/ConsentManager\";\nexport { ConsentBanner } from \"./components/consent/ConsentBanner\";\nexport { ConsentSettings } from \"./components/consent/ConsentSettings\";\nexport type {\n ConsentManagerProps,\n BannerProps,\n SettingsProps,\n RenderProps,\n} from \"./components/consent/ConsentManager\";\n\n// Unstyled components\nexport {\n UnstyledConsentBanner,\n UnstyledConsentSettings,\n UnstyledConsentToggle,\n} from \"./components/consent/unstyled\";\n\n// Hooks\nexport { useConsentState } from \"./hooks/useConsentState\";\nexport { useConsentActions } from \"./hooks/useConsentActions\";\nexport { useConsentManager } from \"./hooks/useConsentManager\";\n\n// Utilities\nexport { consentService } from \"./lib/consentService\";\n\n// Cookie utilities\nexport const cookieUtils = {\n set: (name: string, value: string, days: number) => {\n if (typeof window === \"undefined\") return;\n const date = new Date();\n date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);\n const expires = `expires=${date.toUTCString()}`;\n document.cookie = `${name}=${value};${expires};path=/`;\n },\n get: (name: string): string | null => {\n if (typeof window === \"undefined\") return null;\n const nameEQ = `${name}=`;\n const ca = document.cookie.split(\";\");\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) === \" \") c = c.substring(1, c.length);\n if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);\n }\n return null;\n },\n delete: (name: string) => {\n if (typeof window === \"undefined\") return;\n document.cookie = `${name}=;expires=Thu, 01 Jan 1970 00:00:00 UTC;path=/;`;\n },\n};\n\n// Consent storage utilities\nexport const consentStorage = {\n save: (key: string, data: unknown) => {\n if (typeof window === \"undefined\") return;\n localStorage.setItem(key, JSON.stringify(data));\n },\n load: <T = unknown>(key: string): T | null => {\n if (typeof window === \"undefined\") return null;\n const data = localStorage.getItem(key);\n return data ? (JSON.parse(data) as T) : null;\n },\n remove: (key: string) => {\n if (typeof window === \"undefined\") return;\n localStorage.removeItem(key);\n },\n};\n\n// Additional component exports for demo compatibility\nexport { default as BreachReportForm } from \"./components/breach-notification/BreachNotificationForm\";\nexport { default as BreachNotificationManager } from \"./components/breach-notification/BreachNotificationForm\";\nexport { default as BreachRiskAssessment } from \"./components/breach-notification/BreachNotificationForm\";\nexport { default as RegulatoryReportGenerator } from \"./components/breach-notification/BreachNotificationForm\";\n\n// DPIA components\nexport { default as DPIAQuestionnaire } from \"./components/dpia/DPIAQuestionnaire\";\n\n// Data Subject Rights components \nexport { default as DSRRequestForm } from \"./components/data-subject-rights/DataSubjectRequestForm\";\nexport { default as DSRDashboard } from \"./components/data-subject-rights/DataSubjectRequestForm\";\nexport { default as DSRTracker } from \"./components/data-subject-rights/DataSubjectRequestForm\";\n\n// Privacy Policy components\nexport { default as PolicyGenerator } from \"./components/privacy-policy/PolicyGenerator\";\nexport { default as PolicyPreview } from \"./components/privacy-policy/PolicyGenerator\";\nexport { default as PolicyExporter } from \"./components/privacy-policy/PolicyGenerator\";\n\n// Type exports for demo compatibility\nexport type {\n DSRRequest,\n DSRStatus,\n DSRType,\n DSRRequestType,\n RequestType,\n BreachReport,\n RiskAssessment,\n DPIAQuestion,\n DPIAResult,\n PolicySection,\n PolicyVariable,\n PolicyTemplate,\n ConsentOption,\n BreachSeverity,\n ConsentRecord,\n ConsentHistoryEntry,\n} from \"./types/index\";\n\n\n// Re-export ConsentStorage as named export for demo compatibility\nexport const ConsentStorage = consentStorage;\n"]}
|