@tantainnovative/ndpr-toolkit 2.2.0 → 2.4.1
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/README.md +26 -11
- package/dist/breach.d.mts +94 -6
- package/dist/breach.d.ts +94 -6
- package/dist/breach.js +1 -1
- package/dist/breach.mjs +1 -1
- package/dist/chunk-2XFAV267.mjs +2 -0
- package/dist/chunk-32UIWTGD.js +72 -0
- package/dist/chunk-4JUDKBA2.mjs +7 -0
- package/dist/chunk-4VVARDN2.mjs +2 -0
- package/dist/chunk-5RSOLEEP.js +63 -0
- package/dist/chunk-AYKLAEOU.mjs +2 -0
- package/dist/chunk-BGHQTZAC.js +94 -0
- package/dist/chunk-BZTTQS4A.mjs +7 -0
- package/dist/chunk-CAB7O3GR.mjs +63 -0
- package/dist/chunk-CL53OI3I.js +7 -0
- package/dist/chunk-E64TU6IU.js +2 -0
- package/dist/chunk-EKVTLHBQ.js +2 -0
- package/dist/chunk-ELKEZEV5.mjs +2 -0
- package/dist/chunk-EPF7J2FK.js +3 -0
- package/dist/chunk-ER7X6E36.js +2 -0
- package/dist/chunk-FXTZDKDC.mjs +3 -0
- package/dist/chunk-IBEKLDBY.mjs +2 -0
- package/dist/chunk-ILCNDOBU.js +2 -0
- package/dist/chunk-K3GMTMQ6.js +2 -0
- package/dist/chunk-MJGOLP5M.js +2 -0
- package/dist/chunk-NW4A3JW6.mjs +2 -0
- package/dist/chunk-P3PULLYP.mjs +2 -0
- package/dist/chunk-SKJCQKFL.mjs +94 -0
- package/dist/chunk-TCJCE6WN.js +2 -0
- package/dist/chunk-UZ5EZOA7.js +2 -0
- package/dist/chunk-WSHSHIIM.mjs +2 -0
- package/dist/chunk-XMYUYQH7.mjs +72 -0
- package/dist/chunk-ZNTMZ6NM.js +7 -0
- package/dist/consent-audit-BdByjYlM.d.mts +65 -0
- package/dist/consent-audit-DhbfMR0n.d.ts +65 -0
- package/dist/consent.d.mts +55 -8
- package/dist/consent.d.ts +55 -8
- package/dist/consent.js +1 -1
- package/dist/consent.mjs +1 -1
- package/dist/core.d.mts +52 -2
- package/dist/core.d.ts +52 -2
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/{cross-border-entry-CtX8_o-_.d.ts → cross-border-entry-BrWVPly6.d.ts} +7 -0
- package/dist/{cross-border-entry-BfF7jw5o.d.mts → cross-border-entry-cCTvpwnT.d.mts} +7 -0
- package/dist/cross-border.d.mts +1 -1
- package/dist/cross-border.d.ts +1 -1
- package/dist/cross-border.js +1 -1
- package/dist/cross-border.mjs +1 -1
- package/dist/dpia.d.mts +14 -0
- package/dist/dpia.d.ts +14 -0
- package/dist/dpia.js +1 -1
- package/dist/dpia.mjs +1 -1
- package/dist/dsr.d.mts +60 -5
- package/dist/dsr.d.ts +60 -5
- package/dist/dsr.js +1 -1
- package/dist/dsr.mjs +1 -1
- package/dist/hooks.d.mts +1 -1
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/index.d.mts +11 -10
- package/dist/index.d.ts +11 -10
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{lawful-basis-entry-BeSX7u0U.d.ts → lawful-basis-entry-15qjKcNO.d.ts} +6 -0
- package/dist/{lawful-basis-entry-CMPPM9Rh.d.mts → lawful-basis-entry-CxZrofwG.d.mts} +6 -0
- package/dist/lawful-basis.d.mts +1 -1
- package/dist/lawful-basis.d.ts +1 -1
- package/dist/lawful-basis.js +1 -1
- package/dist/lawful-basis.mjs +1 -1
- package/dist/{policy-dmsRlqgM.d.ts → policy-D2_jh5-T.d.ts} +15 -5
- package/dist/{policy-kZN23hrR.d.mts → policy-E0fXZkda.d.mts} +15 -5
- package/dist/policy-templates-CIKcV0i1.d.ts +36 -0
- package/dist/policy-templates-DMsPwOSZ.d.mts +36 -0
- package/dist/policy.d.mts +3 -3
- package/dist/policy.d.ts +3 -3
- package/dist/policy.js +1 -1
- package/dist/policy.mjs +1 -1
- package/dist/{ropa-entry-DIEQ9WFs.d.ts → ropa-entry-B0D7X1GV.d.ts} +10 -1
- package/dist/{ropa-entry-CZJ91ymk.d.mts → ropa-entry-DiOThOc2.d.mts} +10 -1
- package/dist/ropa.d.mts +1 -1
- package/dist/ropa.d.ts +1 -1
- package/dist/ropa.js +1 -1
- package/dist/ropa.mjs +1 -1
- package/dist/styles.css +40 -28
- package/dist/styles.d.ts +1 -0
- package/dist/{usePrivacyPolicy-CfySfBLS.d.ts → useDefaultPrivacyPolicy-B7kTHbZh.d.ts} +39 -2
- package/dist/{usePrivacyPolicy-Dit2sFuV.d.mts → useDefaultPrivacyPolicy-CUluF_ic.d.mts} +39 -2
- package/package.json +9 -7
- package/dist/chunk-4RGDNVR5.mjs +0 -72
- package/dist/chunk-6LM3RAFO.js +0 -7
- package/dist/chunk-7DNQSOER.js +0 -2
- package/dist/chunk-A7DRHSDQ.mjs +0 -2
- package/dist/chunk-DB3JH4DS.mjs +0 -2
- package/dist/chunk-FC6EG34C.js +0 -72
- package/dist/chunk-FDB6KZUD.mjs +0 -2
- package/dist/chunk-FZUCKGIM.mjs +0 -7
- package/dist/chunk-G3JNFZPT.js +0 -2
- package/dist/chunk-HXCRMA4J.mjs +0 -2
- package/dist/chunk-IC7VOOKJ.mjs +0 -2
- package/dist/chunk-ICUZG6CD.mjs +0 -2
- package/dist/chunk-IW5PHOG7.mjs +0 -7
- package/dist/chunk-IWUUVRLJ.js +0 -2
- package/dist/chunk-JKEAPTYP.js +0 -7
- package/dist/chunk-N52S64SU.js +0 -2
- package/dist/chunk-PM7CMTMB.js +0 -4
- package/dist/chunk-SKAMVXBI.mjs +0 -94
- package/dist/chunk-UYP64PV7.mjs +0 -4
- package/dist/chunk-VURIXCGY.js +0 -2
- package/dist/chunk-VXRY3V42.js +0 -94
- package/dist/chunk-YBPHGEL2.js +0 -2
- package/dist/consent-DCc5zjXI.d.mts +0 -24
- package/dist/consent-DLWb5ota.d.ts +0 -24
- package/dist/privacy-9FcJceMr.d.mts +0 -15
- package/dist/privacy-BXz7O2ej.d.ts +0 -15
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
'use strict';var chunkRYZEIDNR_js=require('./chunk-RYZEIDNR.js'),chunkEPF7J2FK_js=require('./chunk-EPF7J2FK.js'),chunkE64TU6IU_js=require('./chunk-E64TU6IU.js'),chunkMQFZHA2D_js=require('./chunk-MQFZHA2D.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var ze=({categories:N,onSubmit:x,onValidationError:D,title:oe="Report a Data Breach",formDescription:ne="Use this form to report a suspected or confirmed data breach in accordance with NDPA Section 40. All fields marked with * are required.",submitButtonText:de="Submit Report",className:me="",buttonClassName:ee="",classNames:u={},unstyled:n=false,isSubmitting:p=false,showConfirmation:P=true,confirmationMessage:Z="Your breach report has been submitted successfully. The data protection team has been notified.",allowAttachments:pe=true,maxAttachments:L=5,maxFileSize:C=5*1024*1024,allowedFileTypes:I=[".pdf",".jpg",".jpeg",".png",".doc",".docx",".xls",".xlsx",".txt"],defaultValues:d,onReset:q})=>{var we,Re,Ae,Ce,Se;let E=i=>{if(!i)return "";let A=new Date(i),Y=T=>String(T).padStart(2,"0");return `${A.getFullYear()}-${Y(A.getMonth()+1)}-${Y(A.getDate())}T${Y(A.getHours())}:${Y(A.getMinutes())}`},[O,M]=react.useState((d==null?void 0:d.title)||""),[_,J]=react.useState((d==null?void 0:d.description)||""),[z,K]=react.useState((d==null?void 0:d.category)||""),[V,le]=react.useState(E(d==null?void 0:d.discoveredAt)),[Q,ce]=react.useState(E(d==null?void 0:d.occurredAt)),[B,k]=react.useState(((we=d==null?void 0:d.reporter)==null?void 0:we.name)||""),[w,y]=react.useState(((Re=d==null?void 0:d.reporter)==null?void 0:Re.email)||""),[S,te]=react.useState(((Ae=d==null?void 0:d.reporter)==null?void 0:Ae.department)||""),[U,ae]=react.useState(((Ce=d==null?void 0:d.reporter)==null?void 0:Ce.phone)||""),[h,j]=react.useState((d==null?void 0:d.affectedSystems)||[]),[ge,be]=react.useState(((Se=d==null?void 0:d.affectedSystems)==null?void 0:Se.join(", "))||""),[s,f]=react.useState((d==null?void 0:d.dataTypes)||[]),[m,R]=react.useState((d==null?void 0:d.estimatedAffectedSubjects)!=null?String(d.estimatedAffectedSubjects):""),[H,G]=react.useState((d==null?void 0:d.status)||"ongoing"),[ue,re]=react.useState((d==null?void 0:d.initialActions)||""),[$,xe]=react.useState([]),[ye,ve]=react.useState(false),[b,Ne]=react.useState({}),je=()=>{M(""),J(""),K(""),le(""),ce(""),k(""),y(""),te(""),ae(""),j([]),be(""),f([]),R(""),G("ongoing"),re(""),xe([]),ve(false),Ne({}),q==null||q();},$e=i=>{let A=i.target.value;be(A);let Y=A.split(",").map(T=>T.trim()).filter(Boolean);j(Y);},Le=i=>{f(A=>A.includes(i)?A.filter(Y=>Y!==i):[...A,i]);},qe=i=>{var De;let A=i.target.files;if(!A)return;let Y=[],T={};if($.length+A.length>L){T.attachments=`Maximum of ${L} files allowed`,Ne(X=>chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},X),T));return}for(let X=0;X<A.length;X++){let ke=A[X];if(ke.size>C){T.attachments=`File ${ke.name} exceeds the maximum size of ${C/(1024*1024)}MB`;continue}let Be="."+((De=ke.name.split(".").pop())==null?void 0:De.toLowerCase());if(!I.includes(Be)){T.attachments=`File type ${Be} is not allowed`;continue}Y.push(ke);}Object.keys(T).length>0?Ne(X=>chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},X),T)):(xe(X=>[...X,...Y]),Ne(X=>chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},X),{attachments:""})));},Ee=i=>{xe(A=>A.filter((Y,T)=>T!==i));},Oe=()=>{let i={};return O.trim()||(i.breachTitle="Breach title is required"),_.trim()||(i.description="Description is required"),z||(i.category="Category is required"),V||(i.discoveredAt="Discovery date is required"),B.trim()||(i.reporterName="Reporter name is required"),w.trim()?/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(w)||(i.reporterEmail="Reporter email is invalid"):i.reporterEmail="Reporter email is required",S.trim()||(i.reporterDepartment="Reporter department is required"),h.length===0&&(i.affectedSystems="At least one affected system is required"),s.length===0&&(i.dataTypes="At least one data type is required"),m&&isNaN(Number(m))&&(i.estimatedAffectedSubjects="Estimated affected subjects must be a number"),Ne(i),i},Me=i=>{i.preventDefault();let A=Oe();if(Object.keys(A).length>0){D==null||D(A);return}let Y={title:chunkEPF7J2FK_js.a(O),description:chunkEPF7J2FK_js.a(_),category:z,discoveredAt:new Date(V).getTime(),occurredAt:Q?new Date(Q).getTime():void 0,reportedAt:Date.now(),reporter:{name:chunkEPF7J2FK_js.a(B),email:chunkEPF7J2FK_js.a(w),department:chunkEPF7J2FK_js.a(S),phone:U?chunkEPF7J2FK_js.a(U):void 0},affectedSystems:h.map(T=>chunkEPF7J2FK_js.a(T)),dataTypes:s,estimatedAffectedSubjects:m?Number(m):void 0,status:H,initialActions:ue?chunkEPF7J2FK_js.a(ue):void 0,attachments:$.map(T=>({name:T.name,type:T.type,size:T.size,file:T}))};x(Y),P&&ve(true);};if(ye)return jsxRuntime.jsxs("div",{className:`p-4 bg-green-50 dark:bg-green-900/20 rounded-md ${me}`,children:[jsxRuntime.jsx("h2",{className:"text-lg font-bold text-green-800 dark:text-green-200 mb-2",children:"Report Submitted"}),jsxRuntime.jsx("p",{className:"text-green-700 dark:text-green-300",children:Z}),jsxRuntime.jsxs("div",{className:"mt-4 p-4 bg-yellow-50 dark:bg-yellow-900/20 rounded-md",children:[jsxRuntime.jsx("h3",{className:"text-sm font-bold text-yellow-800 dark:text-yellow-200 mb-2",children:"Important: Next Steps"}),jsxRuntime.jsx("p",{className:"text-yellow-700 dark:text-yellow-300 text-sm",children:"Under the NDPA (Section 40), data breaches that pose a risk to the rights and freedoms of data subjects must be reported to the NDPC within 72 hours of discovery. The data protection team will assess this breach and determine if notification is required."})]}),jsxRuntime.jsx("button",{onClick:()=>ve(false),className:`mt-4 px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700 ${ee}`,children:"Report Another Breach"})]});let Ue=[{id:"personal",label:"Personal Information (names, addresses)"},{id:"contact",label:"Contact Information (email, phone)"},{id:"financial",label:"Financial Information (bank details, payment info)"},{id:"health",label:"Health Information"},{id:"identification",label:"Identification Documents (ID cards, passports)"},{id:"login",label:"Login Credentials"},{id:"biometric",label:"Biometric Data"},{id:"children",label:"Children's Data"},{id:"location",label:"Location Data"},{id:"communications",label:"Communications Content"}];return jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${me}`,u.root,n),children:[jsxRuntime.jsx("h2",{className:chunkE64TU6IU_js.a("text-xl font-bold mb-2",u.title,n),children:oe}),jsxRuntime.jsx("p",{className:"mb-6 text-gray-600 dark:text-gray-300",children:ne}),jsxRuntime.jsx("form",{onSubmit:Me,className:chunkE64TU6IU_js.a("",u.form,n),children:jsxRuntime.jsxs("div",{className:"space-y-6",children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("",u.fieldGroup,n),children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold mb-3",children:"Breach Information"}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"breachTitle",className:chunkE64TU6IU_js.a("block text-sm font-medium mb-1",u.label,n),children:["Breach Title/Summary ",jsxRuntime.jsx("span",{className:"text-red-500",children:"*"})]}),jsxRuntime.jsx("input",{type:"text",id:"breachTitle",value:O,onChange:i=>M(i.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",u.input,n),required:true,"aria-invalid":!!b.breachTitle,"aria-describedby":b.breachTitle?"breachTitle-error":void 0}),b.breachTitle&&jsxRuntime.jsx("p",{id:"breachTitle-error",role:"alert",className:"mt-1 text-sm text-red-500",children:b.breachTitle})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"category",className:chunkE64TU6IU_js.a("block text-sm font-medium mb-1",u.label,n),children:["Breach Category ",jsxRuntime.jsx("span",{className:"text-red-500",children:"*"})]}),jsxRuntime.jsxs("select",{id:"category",value:z,onChange:i=>K(i.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",u.select,n),required:true,"aria-invalid":!!b.category,"aria-describedby":b.category?"category-error":void 0,children:[jsxRuntime.jsx("option",{value:"",children:"Select a category"}),N.map(i=>jsxRuntime.jsx("option",{value:i.id,children:i.name},i.id))]}),b.category&&jsxRuntime.jsx("p",{id:"category-error",role:"alert",className:"mt-1 text-sm text-red-500",children:b.category})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2",children:[jsxRuntime.jsxs("label",{htmlFor:"description",className:chunkE64TU6IU_js.a("block text-sm font-medium mb-1",u.label,n),children:["Detailed Description ",jsxRuntime.jsx("span",{className:"text-red-500",children:"*"})]}),jsxRuntime.jsx("textarea",{id:"description",value:_,onChange:i=>J(i.target.value),rows:4,className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",u.textarea,n),required:true,"aria-invalid":!!b.description,"aria-describedby":b.description?"description-error":void 0}),b.description&&jsxRuntime.jsx("p",{id:"description-error",role:"alert",className:"mt-1 text-sm text-red-500",children:b.description})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"discoveredAt",className:"block text-sm font-medium mb-1",children:["Date Discovered ",jsxRuntime.jsx("span",{className:"text-red-500",children:"*"})]}),jsxRuntime.jsx("input",{type:"datetime-local",id:"discoveredAt",value:V,onChange:i=>le(i.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",required:true,"aria-invalid":!!b.discoveredAt,"aria-describedby":b.discoveredAt?"discoveredAt-error":void 0}),b.discoveredAt&&jsxRuntime.jsx("p",{id:"discoveredAt-error",role:"alert",className:"mt-1 text-sm text-red-500",children:b.discoveredAt})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"occurredAt",className:"block text-sm font-medium mb-1",children:"Date Occurred (if known)"}),jsxRuntime.jsx("input",{type:"datetime-local",id:"occurredAt",value:Q,onChange:i=>ce(i.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]"})]})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold mb-3",children:"Reporter Information"}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"reporterName",className:"block text-sm font-medium mb-1",children:["Your Name ",jsxRuntime.jsx("span",{className:"text-red-500",children:"*"})]}),jsxRuntime.jsx("input",{type:"text",id:"reporterName",value:B,onChange:i=>k(i.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",required:true,"aria-invalid":!!b.reporterName,"aria-describedby":b.reporterName?"reporterName-error":void 0}),b.reporterName&&jsxRuntime.jsx("p",{id:"reporterName-error",role:"alert",className:"mt-1 text-sm text-red-500",children:b.reporterName})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"reporterEmail",className:"block text-sm font-medium mb-1",children:["Your Email ",jsxRuntime.jsx("span",{className:"text-red-500",children:"*"})]}),jsxRuntime.jsx("input",{type:"email",id:"reporterEmail",value:w,onChange:i=>y(i.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",required:true,"aria-invalid":!!b.reporterEmail,"aria-describedby":b.reporterEmail?"reporterEmail-error":void 0}),b.reporterEmail&&jsxRuntime.jsx("p",{id:"reporterEmail-error",role:"alert",className:"mt-1 text-sm text-red-500",children:b.reporterEmail})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"reporterDepartment",className:"block text-sm font-medium mb-1",children:["Your Department ",jsxRuntime.jsx("span",{className:"text-red-500",children:"*"})]}),jsxRuntime.jsx("input",{type:"text",id:"reporterDepartment",value:S,onChange:i=>te(i.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",required:true,"aria-invalid":!!b.reporterDepartment,"aria-describedby":b.reporterDepartment?"reporterDepartment-error":void 0}),b.reporterDepartment&&jsxRuntime.jsx("p",{id:"reporterDepartment-error",role:"alert",className:"mt-1 text-sm text-red-500",children:b.reporterDepartment})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"reporterPhone",className:"block text-sm font-medium mb-1",children:"Your Phone Number (Optional)"}),jsxRuntime.jsx("input",{type:"tel",id:"reporterPhone",value:U,onChange:i=>ae(i.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]"})]})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold mb-3",children:"Impact Information"}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"affectedSystems",className:"block text-sm font-medium mb-1",children:["Affected Systems/Applications ",jsxRuntime.jsx("span",{className:"text-red-500",children:"*"})]}),jsxRuntime.jsx("input",{type:"text",id:"affectedSystems",value:ge,onChange:$e,placeholder:"e.g. CRM, Email Server, Website (comma separated)",className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",required:true,"aria-invalid":!!b.affectedSystems,"aria-describedby":b.affectedSystems?"affectedSystems-error":void 0}),b.affectedSystems&&jsxRuntime.jsx("p",{id:"affectedSystems-error",role:"alert",className:"mt-1 text-sm text-red-500",children:b.affectedSystems})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"estimatedAffectedSubjects",className:"block text-sm font-medium mb-1",children:"Estimated Number of Affected Data Subjects"}),jsxRuntime.jsx("input",{type:"text",id:"estimatedAffectedSubjects",value:m,onChange:i=>R(i.target.value),placeholder:"e.g. 100",className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]","aria-invalid":!!b.estimatedAffectedSubjects,"aria-describedby":b.estimatedAffectedSubjects?"estimatedAffectedSubjects-error":void 0}),b.estimatedAffectedSubjects&&jsxRuntime.jsx("p",{id:"estimatedAffectedSubjects-error",role:"alert",className:"mt-1 text-sm text-red-500",children:b.estimatedAffectedSubjects})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2",children:[jsxRuntime.jsxs("label",{className:"block text-sm font-medium mb-1",children:["Types of Data Involved ",jsxRuntime.jsx("span",{className:"text-red-500",children:"*"})]}),jsxRuntime.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:Ue.map(i=>jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("input",{type:"checkbox",id:`dataType_${i.id}`,checked:s.includes(i.id),onChange:()=>Le(i.id),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsxRuntime.jsx("label",{htmlFor:`dataType_${i.id}`,className:"ml-2 text-sm text-gray-700 dark:text-gray-300",children:i.label})]},i.id))}),b.dataTypes&&jsxRuntime.jsx("p",{id:"dataTypes-error",role:"alert",className:"mt-1 text-sm text-red-500",children:b.dataTypes})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"status",className:"block text-sm font-medium mb-1",children:["Current Status ",jsxRuntime.jsx("span",{className:"text-red-500",children:"*"})]}),jsxRuntime.jsxs("select",{id:"status",value:H,onChange:i=>G(i.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",u.select,n),required:true,children:[jsxRuntime.jsx("option",{value:"ongoing",children:"Ongoing (breach is still active)"}),jsxRuntime.jsx("option",{value:"contained",children:"Contained (breach is stopped but not resolved)"}),jsxRuntime.jsx("option",{value:"resolved",children:"Resolved (breach is fully addressed)"})]})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2",children:[jsxRuntime.jsx("label",{htmlFor:"initialActions",className:"block text-sm font-medium mb-1",children:"Initial Actions Taken"}),jsxRuntime.jsx("textarea",{id:"initialActions",value:ue,onChange:i=>re(i.target.value),placeholder:"Describe any immediate actions that have been taken to address the breach",rows:3,className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",u.textarea,n)})]})]})]}),pe&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold mb-3",children:"Attachments"}),jsxRuntime.jsxs("div",{className:"mb-4",children:[jsxRuntime.jsx("label",{className:"block text-sm font-medium mb-1",children:"Upload Supporting Files (Optional)"}),jsxRuntime.jsxs("p",{className:"text-xs text-gray-600 dark:text-gray-400 mb-2",children:["Max ",L," files, ",C/(1024*1024),"MB each. Allowed types: ",I.join(", ")]}),jsxRuntime.jsx("input",{type:"file",onChange:qe,multiple:true,className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",accept:I.join(",")}),b.attachments&&jsxRuntime.jsx("p",{id:"attachments-error",role:"alert",className:"mt-1 text-sm text-red-500",children:b.attachments})]}),$.length>0&&jsxRuntime.jsxs("div",{className:"mb-4",children:[jsxRuntime.jsx("h4",{className:"text-sm font-medium mb-2",children:"Attached Files:"}),jsxRuntime.jsx("ul",{className:"space-y-2",children:$.map((i,A)=>jsxRuntime.jsxs("li",{className:"flex items-center justify-between p-2 bg-gray-50 dark:bg-gray-700 rounded",children:[jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("svg",{className:"w-4 h-4 text-gray-500 dark:text-gray-400 mr-2",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M8 4a3 3 0 00-3 3v4a5 5 0 0010 0V7a1 1 0 112 0v4a7 7 0 11-14 0V7a5 5 0 0110 0v4a3 3 0 11-6 0V7a1 1 0 012 0v4a1 1 0 102 0V7a3 3 0 00-3-3z",clipRule:"evenodd"})}),jsxRuntime.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:i.name}),jsxRuntime.jsxs("span",{className:"ml-2 text-xs text-gray-600 dark:text-gray-400",children:["(",(i.size/1024).toFixed(1)," KB)"]})]}),jsxRuntime.jsx("button",{type:"button",onClick:()=>Ee(A),className:"text-red-500 hover:text-red-700",children:jsxRuntime.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]},A))})]})]}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("mt-6 p-4 bg-blue-50 dark:bg-blue-900/20 rounded-md",u.notice,n),children:[jsxRuntime.jsx("h3",{className:"text-sm font-bold text-blue-800 dark:text-blue-200 mb-2",children:"NDPA Breach Notification Requirements"}),jsxRuntime.jsx("p",{className:"text-blue-700 dark:text-blue-300 text-sm",children:"Under the Nigeria Data Protection Act (NDPA), Section 40, data breaches that pose a risk to the rights and freedoms of data subjects must be reported to the NDPC within 72 hours of discovery. The data protection team will assess this breach and determine if notification is required."})]}),jsxRuntime.jsxs("div",{className:"mt-6 relative flex gap-3",children:[p&&u.loadingOverlay&&jsxRuntime.jsx("div",{className:u.loadingOverlay}),jsxRuntime.jsx("button",{type:"submit",disabled:p,className:chunkE64TU6IU_js.a(`px-6 py-3 bg-[rgb(var(--ndpr-primary))] text-white rounded-md hover:bg-[rgb(var(--ndpr-primary-hover))] focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))] focus:ring-offset-2 ${ee} ${p?"opacity-50 cursor-not-allowed":""}`,u.primaryButton||u.submitButton,n),children:p?"Submitting...":de}),jsxRuntime.jsx("button",{type:"button",onClick:je,disabled:p,className:chunkE64TU6IU_js.a("px-6 py-3 bg-gray-200 dark:bg-gray-600 text-gray-700 dark:text-gray-200 rounded-md hover:bg-gray-300 dark:hover:bg-gray-500 focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2",void 0,n),children:"Reset"})]})]})})]})};var tt=({breachData:N,initialAssessment:x={},onComplete:D,title:oe="Breach Risk Assessment",description:ne="Assess the risk level of this data breach to determine notification requirements under NDPA Section 40.",submitButtonText:de="Complete Assessment",className:me="",buttonClassName:ee="",classNames:u={},unstyled:n=false,showBreachSummary:p=true,showNotificationRequirements:P=true})=>{let[Z,pe]=react.useState(x.confidentialityImpact||3),[L,C]=react.useState(x.integrityImpact||3),[I,d]=react.useState(x.availabilityImpact||3),[q,E]=react.useState(x.harmLikelihood||3),[O,M]=react.useState(x.harmSeverity||3),[_,J]=react.useState(x.risksToRightsAndFreedoms!==void 0?x.risksToRightsAndFreedoms:false),[z,K]=react.useState(x.highRisksToRightsAndFreedoms!==void 0?x.highRisksToRightsAndFreedoms:false),[V,le]=react.useState(x.justification||""),[Q,ce]=react.useState(0),[B,k]=react.useState("low"),[w,y]=react.useState(false),[S,te]=react.useState(0),[U,ae]=react.useState(0),[h,j]=react.useState(false);react.useEffect(()=>{let re=Z*.2+L*.1+I*.1+q*.3+O*.3;ce(Number(re.toFixed(1)));let $;re<2?$="low":re<3?$="medium":re<4?$="high":$="critical",k($),y(_||$==="high"||$==="critical");let ye=N.discoveredAt+4320*60*1e3;te(ye);let ve=Date.now(),b=(ye-ve)/(3600*1e3);ae(Number(b.toFixed(1)));},[Z,L,I,q,O,_,N.discoveredAt]);let ge=m=>new Date(m).toLocaleString(),be=m=>{m.preventDefault();let R={id:x.id||`assessment_${Date.now()}`,breachId:N.id,assessedAt:Date.now(),assessor:x.assessor||{name:"Assessment User",role:"Data Protection Officer",email:"dpo@example.com"},confidentialityImpact:Z,integrityImpact:L,availabilityImpact:I,harmLikelihood:q,harmSeverity:O,overallRiskScore:Q,riskLevel:B,risksToRightsAndFreedoms:_,highRisksToRightsAndFreedoms:z,justification:V};D(R),j(true);},s=m=>{switch(m){case 1:return "Minimal";case 2:return "Low";case 3:return "Moderate";case 4:return "High";case 5:return "Severe";default:return "Unknown"}},f=m=>jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a(`px-2 py-1 rounded text-xs font-medium ${{low:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200",medium:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200",high:"bg-orange-100 text-orange-800 dark:bg-orange-900 dark:text-orange-200",critical:"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200"}[m]}`,u.riskBadge,n),children:m.charAt(0).toUpperCase()+m.slice(1)});return jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${me}`,u.root,n),children:[jsxRuntime.jsx("h2",{className:chunkE64TU6IU_js.a("text-xl font-bold mb-2",u.title,n),children:oe}),jsxRuntime.jsx("p",{className:"mb-6 text-gray-600 dark:text-gray-300",children:ne}),p&&jsxRuntime.jsxs("div",{className:"mb-6 p-4 bg-gray-50 dark:bg-gray-700 rounded-md",children:[jsxRuntime.jsx("h3",{className:"text-lg font-medium mb-2",children:"Breach Summary"}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("p",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Title:"})," ",N.title]}),jsxRuntime.jsxs("p",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Discovered:"})," ",ge(N.discoveredAt)]}),jsxRuntime.jsxs("p",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Status:"})," ",N.status.charAt(0).toUpperCase()+N.status.slice(1)]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("p",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Data Types:"})," ",N.dataTypes.join(", ")]}),jsxRuntime.jsxs("p",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Affected Systems:"})," ",N.affectedSystems.join(", ")]}),jsxRuntime.jsxs("p",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Affected Subjects:"})," ",N.estimatedAffectedSubjects||"Unknown"]})]})]})]}),h?jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"mb-6 p-4 bg-blue-50 dark:bg-blue-900/20 rounded-md",children:[jsxRuntime.jsx("h3",{className:"text-lg font-medium mb-3",children:"Assessment Results"}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("p",{className:"text-sm mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Overall Risk Level:"})," ",f(B)]}),jsxRuntime.jsxs("p",{className:"text-sm mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Risk Score:"})," ",Q," / 5"]}),jsxRuntime.jsxs("p",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Assessed On:"})," ",ge(Date.now())]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("p",{className:"text-sm mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Risks to Rights and Freedoms:"})," ",_?"Yes":"No"]}),jsxRuntime.jsxs("p",{className:"text-sm mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"High Risks to Rights and Freedoms:"})," ",z?"Yes":"No"]})]})]}),jsxRuntime.jsxs("div",{className:"mt-3",children:[jsxRuntime.jsx("p",{className:"text-sm mb-1",children:jsxRuntime.jsx("span",{className:"font-medium",children:"Justification:"})}),jsxRuntime.jsx("p",{className:"text-sm bg-white dark:bg-gray-800 p-2 rounded",children:V})]})]}),P&&jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a(`mb-6 p-4 rounded-md ${w?U>24?"bg-yellow-50 dark:bg-yellow-900/20":"bg-red-50 dark:bg-red-900/20":"bg-green-50 dark:bg-green-900/20"}`,u.notificationStatus,n),children:[jsxRuntime.jsx("h3",{className:"text-lg font-medium mb-3",children:"Notification Requirements"}),w?jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:`text-sm font-bold mb-2 ${U>24?"text-yellow-800 dark:text-yellow-200":"text-red-800 dark:text-red-200"}`,children:"NDPC Notification Required"}),jsxRuntime.jsx("p",{className:"text-sm mb-2",children:"Under the NDPA (Section 40), this breach must be reported to the NDPC within 72 hours of discovery."}),jsxRuntime.jsxs("p",{className:"text-sm mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Notification Deadline:"})," ",ge(S)]}),jsxRuntime.jsxs("p",{className:"text-sm mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Time Remaining:"})," ",jsxRuntime.jsx("span",{className:U<24?"text-red-600 dark:text-red-400 font-bold":"",children:U>0?`${U} hours`:"Deadline passed"})]}),jsxRuntime.jsxs("p",{className:"text-sm mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Data Subject Notification:"})," ",z?"Required (NDPA Section 40(4))":"Not required unless directed by NDPC"]})]}):jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"text-sm font-bold mb-2 text-green-800 dark:text-green-200",children:"NDPC Notification Not Required"}),jsxRuntime.jsx("p",{className:"text-sm mb-2",children:"Based on this assessment, this breach does not need to be reported to the NDPC."}),jsxRuntime.jsx("p",{className:"text-sm mb-2",children:"However, the breach should still be documented internally for compliance purposes."})]}),jsxRuntime.jsxs("div",{className:"mt-3 text-sm",children:[jsxRuntime.jsx("p",{className:"font-medium",children:"Next Steps:"}),jsxRuntime.jsx("ul",{className:"list-disc pl-5 mt-1",children:w?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("li",{children:"Prepare a notification report for the NDPC"}),jsxRuntime.jsx("li",{children:"Document all aspects of the breach and your response"}),z&&jsxRuntime.jsx("li",{children:"Prepare communications for affected data subjects"}),jsxRuntime.jsx("li",{children:"Implement measures to mitigate the impact of the breach"})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("li",{children:"Document the breach and this assessment in your internal records"}),jsxRuntime.jsx("li",{children:"Implement measures to prevent similar breaches in the future"}),jsxRuntime.jsx("li",{children:"Review and update security measures as needed"})]})})]})]}),jsxRuntime.jsx("button",{onClick:()=>j(false),className:chunkE64TU6IU_js.a(`px-4 py-2 bg-[rgb(var(--ndpr-primary))] text-white rounded hover:bg-[rgb(var(--ndpr-primary-hover))] ${ee}`,u.primaryButton||u.submitButton,n),children:"Edit Assessment"})]}):jsxRuntime.jsx("form",{onSubmit:be,children:jsxRuntime.jsxs("div",{className:"space-y-6",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold mb-3",children:"Impact Assessment"}),jsxRuntime.jsxs("div",{className:"mb-4",children:[jsxRuntime.jsxs("label",{htmlFor:"confidentialityImpact",className:"block text-sm font-medium mb-1",children:["Confidentiality Impact (1-5)",jsxRuntime.jsx("span",{className:"ml-2 text-sm text-gray-600 dark:text-gray-400",children:"How much has the confidentiality of data been compromised?"})]}),jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("input",{type:"range",id:"confidentialityImpact",min:"1",max:"5",step:"1",value:Z,onChange:m=>pe(parseInt(m.target.value)),className:chunkE64TU6IU_js.a("w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700",u.slider,n)}),jsxRuntime.jsxs("span",{className:"ml-3 w-24 text-sm",children:[s(Z)," (",Z,")"]})]})]}),jsxRuntime.jsxs("div",{className:"mb-4",children:[jsxRuntime.jsxs("label",{htmlFor:"integrityImpact",className:"block text-sm font-medium mb-1",children:["Integrity Impact (1-5)",jsxRuntime.jsx("span",{className:"ml-2 text-sm text-gray-600 dark:text-gray-400",children:"How much has the integrity of data been compromised?"})]}),jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("input",{type:"range",id:"integrityImpact",min:"1",max:"5",step:"1",value:L,onChange:m=>C(parseInt(m.target.value)),className:chunkE64TU6IU_js.a("w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700",u.slider,n)}),jsxRuntime.jsxs("span",{className:"ml-3 w-24 text-sm",children:[s(L)," (",L,")"]})]})]}),jsxRuntime.jsxs("div",{className:"mb-4",children:[jsxRuntime.jsxs("label",{htmlFor:"availabilityImpact",className:"block text-sm font-medium mb-1",children:["Availability Impact (1-5)",jsxRuntime.jsx("span",{className:"ml-2 text-sm text-gray-600 dark:text-gray-400",children:"How much has the availability of data or systems been compromised?"})]}),jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("input",{type:"range",id:"availabilityImpact",min:"1",max:"5",step:"1",value:I,onChange:m=>d(parseInt(m.target.value)),className:chunkE64TU6IU_js.a("w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700",u.slider,n)}),jsxRuntime.jsxs("span",{className:"ml-3 w-24 text-sm",children:[s(I)," (",I,")"]})]})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold mb-3",children:"Risk to Data Subjects"}),jsxRuntime.jsxs("div",{className:"mb-4",children:[jsxRuntime.jsxs("label",{htmlFor:"harmLikelihood",className:"block text-sm font-medium mb-1",children:["Likelihood of Harm (1-5)",jsxRuntime.jsx("span",{className:"ml-2 text-sm text-gray-600 dark:text-gray-400",children:"How likely is it that data subjects will experience harm?"})]}),jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("input",{type:"range",id:"harmLikelihood",min:"1",max:"5",step:"1",value:q,onChange:m=>E(parseInt(m.target.value)),className:chunkE64TU6IU_js.a("w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700",u.slider,n)}),jsxRuntime.jsxs("span",{className:"ml-3 w-24 text-sm",children:[s(q)," (",q,")"]})]})]}),jsxRuntime.jsxs("div",{className:"mb-4",children:[jsxRuntime.jsxs("label",{htmlFor:"harmSeverity",className:"block text-sm font-medium mb-1",children:["Severity of Harm (1-5)",jsxRuntime.jsx("span",{className:"ml-2 text-sm text-gray-600 dark:text-gray-400",children:"How severe would the harm be to affected data subjects?"})]}),jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("input",{type:"range",id:"harmSeverity",min:"1",max:"5",step:"1",value:O,onChange:m=>M(parseInt(m.target.value)),className:chunkE64TU6IU_js.a("w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700",u.slider,n)}),jsxRuntime.jsxs("span",{className:"ml-3 w-24 text-sm",children:[s(O)," (",O,")"]})]})]}),jsxRuntime.jsxs("div",{className:"mb-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center mb-2",children:[jsxRuntime.jsx("input",{type:"checkbox",id:"risksToRightsAndFreedoms",checked:_,onChange:m=>J(m.target.checked),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsxRuntime.jsx("label",{htmlFor:"risksToRightsAndFreedoms",className:"ml-2 text-sm font-medium",children:"This breach poses a risk to the rights and freedoms of data subjects"})]}),jsxRuntime.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 ml-6",children:"Under the NDPA (Section 40), breaches that pose a risk to rights and freedoms must be reported to the NDPC within 72 hours."})]}),jsxRuntime.jsxs("div",{className:"mb-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center mb-2",children:[jsxRuntime.jsx("input",{type:"checkbox",id:"highRisksToRightsAndFreedoms",checked:z,onChange:m=>K(m.target.checked),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsxRuntime.jsx("label",{htmlFor:"highRisksToRightsAndFreedoms",className:"ml-2 text-sm font-medium",children:"This breach poses a high risk to the rights and freedoms of data subjects"})]}),jsxRuntime.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 ml-6",children:"Under the NDPA (Section 40(4)), breaches that pose a high risk to rights and freedoms also require notification to affected data subjects without undue delay."})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold mb-3",children:"Overall Assessment"}),jsxRuntime.jsxs("div",{className:"mb-4 p-4 bg-gray-50 dark:bg-gray-700 rounded-md",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Overall Risk Score:"}),jsxRuntime.jsxs("span",{className:chunkE64TU6IU_js.a("",u.riskScore,n),children:[Q," / 5"]})]}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Risk Level:"}),f(B)]})]}),jsxRuntime.jsxs("div",{className:"mb-4",children:[jsxRuntime.jsxs("label",{htmlFor:"justification",className:"block text-sm font-medium mb-1",children:["Justification for Assessment ",jsxRuntime.jsx("span",{className:"text-red-500",children:"*"})]}),jsxRuntime.jsx("textarea",{id:"justification",value:V,onChange:m=>le(m.target.value),rows:4,placeholder:"Explain the reasoning behind your assessment, including any factors that influenced your decision.",className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",required:true})]})]}),jsxRuntime.jsxs("div",{className:"mt-6 p-4 bg-blue-50 dark:bg-blue-900/20 rounded-md",children:[jsxRuntime.jsx("h3",{className:"text-sm font-bold text-blue-800 dark:text-blue-200 mb-2",children:"NDPA Breach Notification Requirements"}),jsxRuntime.jsx("p",{className:"text-blue-700 dark:text-blue-300 text-sm",children:"Under the Nigeria Data Protection Act (NDPA), Section 40, data breaches that pose a risk to the rights and freedoms of data subjects must be reported to the NDPC within 72 hours of discovery. This assessment will determine if notification is required for this breach."})]}),jsxRuntime.jsx("div",{className:"mt-6",children:jsxRuntime.jsx("button",{type:"submit",className:chunkE64TU6IU_js.a(`px-6 py-3 bg-[rgb(var(--ndpr-primary))] text-white rounded-md hover:bg-[rgb(var(--ndpr-primary-hover))] focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))] focus:ring-offset-2 ${ee}`,u.primaryButton||u.submitButton,n),children:de})})]})})]})};var dt=({breachReports:N,riskAssessments:x,regulatoryNotifications:D,onSelectBreach:oe,onRequestAssessment:ne,onRequestNotification:de,title:me="Breach Notification Manager",description:ee="Manage data breach notifications and track compliance with NDPA Section 40 requirements.",className:u="",buttonClassName:n="",classNames:p={},unstyled:P=false,showBreachDetails:Z=true,showNotificationTimeline:pe=true,showDeadlineAlerts:L=true})=>{var be;let[C,I]=react.useState(null),[d,q]=react.useState(N),[E,O]=react.useState("all"),[M,_]=react.useState(""),[J,z]=react.useState("discoveredAt"),[K,V]=react.useState("desc");react.useEffect(()=>{let s=[...N];if(E!=="all"&&(s=s.filter(f=>f.status===E)),M){let f=M.toLowerCase();s=s.filter(m=>m.title.toLowerCase().includes(f)||m.description.toLowerCase().includes(f)||m.affectedSystems.some(R=>R.toLowerCase().includes(f))||m.dataTypes.some(R=>R.toLowerCase().includes(f)));}s.sort((f,m)=>{let R=0;switch(J){case "title":R=f.title.localeCompare(m.title);break;case "discoveredAt":R=f.discoveredAt-m.discoveredAt;break;case "status":R=f.status.localeCompare(m.status);break;case "riskLevel":let H=x.find($=>$.breachId===f.id),G=x.find($=>$.breachId===m.id),ue=(H==null?void 0:H.riskLevel)||"unknown",re=(G==null?void 0:G.riskLevel)||"unknown";R=ue.localeCompare(re);break;default:R=f.discoveredAt-m.discoveredAt;}return K==="asc"?R:-R}),q(s);},[N,E,M,J,K,x]),react.useEffect(()=>{d.length>0&&!C&&I(d[0].id);},[d,C]);let le=s=>{I(s),oe&&oe(s);},Q=()=>{C&&ne&&ne(C);},ce=()=>{C&&de&&de(C);},B=s=>new Date(s).toLocaleString(),k=C?N.find(s=>s.id===C):null,w=C?x.find(s=>s.breachId===C):null,y=C?D.find(s=>s.breachId===C):null,S=k?te(k,w):null;function te(s,f){let m=chunkRYZEIDNR_js.a(s,f||void 0),R=s.discoveredAt+m.timeframeHours*60*60*1e3;return {ndpcNotificationRequired:m.notificationRequired,ndpcNotificationDeadline:R,dataSubjectNotificationRequired:(f==null?void 0:f.highRisksToRightsAndFreedoms)||false,justification:m.justification}}function U(s){let f=Date.now(),m=(s-f)/(3600*1e3);return Number(m.toFixed(1))}let ae=s=>s?jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a(`px-2 py-1 rounded text-xs font-medium ${{low:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200",medium:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200",high:"bg-orange-100 text-orange-800 dark:bg-orange-900 dark:text-orange-200",critical:"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200"}[s]}`,p.statusBadge,P),children:s.charAt(0).toUpperCase()+s.slice(1)}):null,h=s=>jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a(`px-2 py-1 rounded text-xs font-medium ${{ongoing:"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200",contained:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200",resolved:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200"}[s]||"bg-gray-100 text-gray-800 dark:bg-gray-900 dark:text-gray-200"}`,p.statusBadge,P),children:s.charAt(0).toUpperCase()+s.slice(1)}),j=()=>{if(!k||!S)return null;if(!S.ndpcNotificationRequired)return jsxRuntime.jsxs("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-md",children:[jsxRuntime.jsx("p",{className:"text-sm text-green-800 dark:text-green-200 font-medium",children:"Notification Not Required"}),jsxRuntime.jsx("p",{className:"text-xs text-green-700 dark:text-green-300 mt-1",children:"Based on the risk assessment, NDPC notification is not required for this breach."})]});if(y)return jsxRuntime.jsxs("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-md",children:[jsxRuntime.jsx("p",{className:"text-sm text-green-800 dark:text-green-200 font-medium",children:"Notification Sent"}),jsxRuntime.jsxs("p",{className:"text-xs text-green-700 dark:text-green-300 mt-1",children:["Notification was sent to the NDPC on ",B(y.sentAt),"."]})]});let s=U(S.ndpcNotificationDeadline);return s<=0?jsxRuntime.jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-md",children:[jsxRuntime.jsx("p",{className:"text-sm text-red-800 dark:text-red-200 font-medium",children:"Notification Deadline Passed"}),jsxRuntime.jsx("p",{className:"text-xs text-red-700 dark:text-red-300 mt-1",children:"The 72-hour deadline for NDPC notification has passed. Notification should be sent immediately."})]}):s<=24?jsxRuntime.jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-md",children:[jsxRuntime.jsx("p",{className:"text-sm text-red-800 dark:text-red-200 font-medium",children:"Urgent: Notification Due Soon"}),jsxRuntime.jsxs("p",{className:"text-xs text-red-700 dark:text-red-300 mt-1",children:["Only ",s," hours remaining until the NDPC notification deadline."]})]}):jsxRuntime.jsxs("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 p-3 rounded-md",children:[jsxRuntime.jsx("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 font-medium",children:"Notification Required"}),jsxRuntime.jsxs("p",{className:"text-xs text-yellow-700 dark:text-yellow-300 mt-1",children:["NDPC notification is required by ",B(S.ndpcNotificationDeadline)," (",s," hours remaining)."]})]})},ge=()=>{if(!k)return null;let s=[{title:"Breach Discovered",date:k.discoveredAt,completed:true,description:`Breach was discovered on ${B(k.discoveredAt)}.`},{title:"Risk Assessment",date:w==null?void 0:w.assessedAt,completed:!!w,description:w?`Risk assessment completed on ${B(w.assessedAt)}.`:"Risk assessment has not been completed yet."}];return S!=null&&S.ndpcNotificationRequired&&s.push({title:"NDPC Notification",date:y==null?void 0:y.sentAt,completed:!!y,description:y?`Notification sent to the NDPC on ${B(y.sentAt)}.`:`Notification must be sent to the NDPC by ${B(S.ndpcNotificationDeadline)}.`}),S!=null&&S.dataSubjectNotificationRequired&&s.push({title:"Data Subject Notification",date:void 0,completed:false,description:"Notification to affected data subjects is required but has not been sent yet."}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("mt-6",p.timeline,P),children:[jsxRuntime.jsx("h3",{className:"text-lg font-medium mb-4",children:"Notification Timeline"}),jsxRuntime.jsx("ol",{className:"relative border-l border-gray-200 dark:border-gray-700",children:s.map((f,m)=>jsxRuntime.jsxs("li",{className:chunkE64TU6IU_js.a("mb-6 ml-4",p.timelineStep,P),children:[jsxRuntime.jsx("div",{className:`absolute w-3 h-3 rounded-full mt-1.5 -left-1.5 border ${f.completed?"bg-green-500 border-green-500 dark:border-green-500":"bg-gray-200 border-gray-200 dark:bg-gray-700 dark:border-gray-700"}`}),jsxRuntime.jsx("time",{className:"mb-1 text-sm font-normal leading-none text-gray-600 dark:text-gray-500",children:f.date?B(f.date):"Pending"}),jsxRuntime.jsx("h4",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:f.title}),jsxRuntime.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:f.description})]},m))})]})};return jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${u}`,p.root,P),children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("",p.header,P),children:[jsxRuntime.jsx("h2",{className:chunkE64TU6IU_js.a("text-xl font-bold mb-2",p.title,P),children:me}),jsxRuntime.jsx("p",{className:"mb-6 text-gray-600 dark:text-gray-300",children:ee})]}),jsxRuntime.jsxs("div",{className:"mb-6 grid grid-cols-1 md:grid-cols-3 gap-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"statusFilter",className:"block text-sm font-medium mb-1",children:"Status Filter"}),jsxRuntime.jsxs("select",{id:"statusFilter",value:E,onChange:s=>O(s.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",children:[jsxRuntime.jsx("option",{value:"all",children:"All Statuses"}),jsxRuntime.jsx("option",{value:"ongoing",children:"Ongoing"}),jsxRuntime.jsx("option",{value:"contained",children:"Contained"}),jsxRuntime.jsx("option",{value:"resolved",children:"Resolved"})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"sortBy",className:"block text-sm font-medium mb-1",children:"Sort By"}),jsxRuntime.jsxs("select",{id:"sortBy",value:J,onChange:s=>z(s.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",children:[jsxRuntime.jsx("option",{value:"discoveredAt",children:"Discovery Date"}),jsxRuntime.jsx("option",{value:"title",children:"Title"}),jsxRuntime.jsx("option",{value:"status",children:"Status"}),jsxRuntime.jsx("option",{value:"riskLevel",children:"Risk Level"})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"searchTerm",className:"block text-sm font-medium mb-1",children:"Search"}),jsxRuntime.jsx("input",{type:"text",id:"searchTerm",value:M,onChange:s=>_(s.target.value),placeholder:"Search breaches...",className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]"})]})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[jsxRuntime.jsxs("div",{className:"md:col-span-1",children:[jsxRuntime.jsx("h3",{className:"text-lg font-medium mb-3",children:"Breach Reports"}),d.length===0?jsxRuntime.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-sm",children:"No breach reports found."}):jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("space-y-2 max-h-96 overflow-y-auto pr-2",p.breachList,P),children:d.map(s=>{let f=x.find(G=>G.breachId===s.id),m=D.find(G=>G.breachId===s.id),R=te(s,f),H=null;if(R!=null&&R.ndpcNotificationRequired)if(m)H=jsxRuntime.jsx("span",{className:"text-xs text-green-600 dark:text-green-400",children:"Notified"});else {let G=U(R.ndpcNotificationDeadline);G<=0?H=jsxRuntime.jsx("span",{className:"text-xs text-red-600 dark:text-red-400 font-bold",children:"Overdue"}):G<=24?H=jsxRuntime.jsx("span",{className:"text-xs text-red-600 dark:text-red-400",children:"Urgent"}):H=jsxRuntime.jsx("span",{className:"text-xs text-yellow-600 dark:text-yellow-400",children:"Required"});}else H=jsxRuntime.jsx("span",{className:"text-xs text-green-600 dark:text-green-400",children:"Not Required"});return jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a(`p-3 rounded-md cursor-pointer ${C===s.id?"bg-[rgb(var(--ndpr-primary)/0.05)] dark:bg-[rgb(var(--ndpr-primary)/0.1)] border border-[rgb(var(--ndpr-primary)/0.2)] dark:border-[rgb(var(--ndpr-primary)/0.3)]":"bg-gray-50 dark:bg-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600"}`,p.breachItem,P),onClick:()=>le(s.id),children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-start mb-1",children:[jsxRuntime.jsx("h4",{className:"font-medium text-sm",children:s.title}),h(s.status)]}),jsxRuntime.jsxs("p",{className:"text-xs text-gray-600 dark:text-gray-400 mb-1",children:["Discovered: ",new Date(s.discoveredAt).toLocaleDateString()]}),jsxRuntime.jsxs("div",{className:"flex justify-between items-center mt-2",children:[jsxRuntime.jsx("div",{children:f&&ae(f.riskLevel)}),jsxRuntime.jsx("div",{children:H})]})]},s.id)})})]}),jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("md:col-span-2",p.detailPanel,P),children:k?jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-start mb-4",children:[jsxRuntime.jsx("h3",{className:"text-lg font-medium",children:k.title}),h(k.status)]}),L&&jsxRuntime.jsx("div",{className:"mb-4",children:j()}),Z&&jsxRuntime.jsxs("div",{className:"mb-6",children:[jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("p",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Discovered:"})," ",B(k.discoveredAt)]}),k.occurredAt&&jsxRuntime.jsxs("p",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Occurred:"})," ",B(k.occurredAt)]}),jsxRuntime.jsxs("p",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Reporter:"})," ",k.reporter.name]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("p",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Affected Systems:"})," ",k.affectedSystems.join(", ")]}),jsxRuntime.jsxs("p",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Data Types:"})," ",k.dataTypes.join(", ")]}),jsxRuntime.jsxs("p",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Affected Subjects:"})," ",k.estimatedAffectedSubjects||"Unknown"]})]})]}),jsxRuntime.jsxs("div",{className:"mb-4",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium",children:"Description:"}),jsxRuntime.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 bg-gray-50 dark:bg-gray-700 p-2 rounded-md mt-1",children:k.description})]}),k.initialActions&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"text-sm font-medium",children:"Initial Actions Taken:"}),jsxRuntime.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 bg-gray-50 dark:bg-gray-700 p-2 rounded-md mt-1",children:k.initialActions})]})]}),jsxRuntime.jsxs("div",{className:"mb-6",children:[jsxRuntime.jsx("h3",{className:"text-lg font-medium mb-3",children:"Risk Assessment"}),w?jsxRuntime.jsxs("div",{className:"bg-gray-50 dark:bg-gray-700 p-3 rounded-md",children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-center mb-2",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium",children:"Risk Level:"}),ae(w.riskLevel)]}),jsxRuntime.jsxs("p",{className:"text-sm mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Risk Score:"})," ",w.overallRiskScore," / 5"]}),jsxRuntime.jsxs("p",{className:"text-sm mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Risks to Rights and Freedoms:"})," ",w.risksToRightsAndFreedoms?"Yes":"No"]}),jsxRuntime.jsxs("p",{className:"text-sm mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"High Risks to Rights and Freedoms:"})," ",w.highRisksToRightsAndFreedoms?"Yes":"No"]}),jsxRuntime.jsx("p",{className:"text-sm mb-1",children:jsxRuntime.jsx("span",{className:"font-medium",children:"Justification:"})}),jsxRuntime.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-300 bg-white dark:bg-gray-800 p-2 rounded-md",children:w.justification})]}):jsxRuntime.jsxs("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 p-3 rounded-md",children:[jsxRuntime.jsx("p",{className:"text-sm text-yellow-800 dark:text-yellow-200",children:"Risk assessment has not been conducted yet."}),jsxRuntime.jsx("button",{onClick:Q,className:`mt-2 px-3 py-1 text-xs bg-yellow-600 text-white rounded hover:bg-yellow-700 ${n}`,children:"Conduct Risk Assessment"})]})]}),jsxRuntime.jsxs("div",{className:"mb-6",children:[jsxRuntime.jsx("h3",{className:"text-lg font-medium mb-3",children:"Notification Status"}),y?jsxRuntime.jsxs("div",{className:"bg-gray-50 dark:bg-gray-700 p-3 rounded-md",children:[jsxRuntime.jsxs("p",{className:"text-sm mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Notification Sent:"})," ",B(y.sentAt)]}),jsxRuntime.jsxs("p",{className:"text-sm mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Method:"})," ",y.method.charAt(0).toUpperCase()+y.method.slice(1)]}),y.referenceNumber&&jsxRuntime.jsxs("p",{className:"text-sm mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Reference Number:"})," ",y.referenceNumber]}),(y.ndpcContact||y.nitdaContact)&&jsxRuntime.jsxs("p",{className:"text-sm mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"NDPC Contact:"})," ",(be=y.ndpcContact||y.nitdaContact)==null?void 0:be.name]})]}):jsxRuntime.jsx("div",{children:S!=null&&S.ndpcNotificationRequired?jsxRuntime.jsxs("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 p-3 rounded-md",children:[jsxRuntime.jsx("p",{className:"text-sm text-yellow-800 dark:text-yellow-200",children:"NDPC notification is required but has not been sent yet."}),jsxRuntime.jsx("button",{onClick:ce,className:`mt-2 px-3 py-1 text-xs bg-yellow-600 text-white rounded hover:bg-yellow-700 ${n}`,children:"Generate Notification"})]}):jsxRuntime.jsx("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-md",children:jsxRuntime.jsx("p",{className:"text-sm text-green-800 dark:text-green-200",children:"NDPC notification is not required for this breach."})})})]}),pe&&ge()]}):jsxRuntime.jsx("div",{className:"flex items-center justify-center h-64 bg-gray-50 dark:bg-gray-700 rounded-md",children:jsxRuntime.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Select a breach to view details"})})})]})]})};var bt=({breachData:N,assessmentData:x,organizationInfo:D,onGenerate:oe,title:ne="Generate NDPC Notification Report",description:de="Generate a report for submission to the NDPC in compliance with NDPA Section 40 breach notification requirements.",generateButtonText:me="Generate Report",className:ee="",buttonClassName:u="",classNames:n={},unstyled:p=false,showPreview:P=true,allowEditing:Z=true,allowDownload:pe=true,downloadFormat:L="pdf"})=>{let[C,I]=react.useState(""),[d,q]=react.useState(""),[E,O]=react.useState(""),[M,_]=react.useState(""),[J,z]=react.useState("email"),[K,V]=react.useState(""),[le,Q]=react.useState(""),[ce,B]=react.useState(false),[k,w]=react.useState(false);react.useEffect(()=>{if(!ce){let h=S();I(h),B(true);}},[N,x,D]);let y=h=>new Date(h).toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"}),S=()=>`
|
|
2
|
+
NDPC DATA BREACH NOTIFICATION
|
|
3
|
+
|
|
4
|
+
Date: ${new Date().toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"})}
|
|
5
|
+
|
|
6
|
+
Reference: NDPA Section 40 - Breach Notification
|
|
7
|
+
|
|
8
|
+
ORGANIZATION DETAILS
|
|
9
|
+
-------------------
|
|
10
|
+
Organization Name: ${D.name}
|
|
11
|
+
${D.registrationNumber?`Registration Number: ${D.registrationNumber}`:""}
|
|
12
|
+
Address: ${D.address}
|
|
13
|
+
${D.website?`Website: ${D.website}`:""}
|
|
14
|
+
|
|
15
|
+
DATA PROTECTION OFFICER
|
|
16
|
+
----------------------
|
|
17
|
+
Name: ${D.dpoName}
|
|
18
|
+
Email: ${D.dpoEmail}
|
|
19
|
+
${D.dpoPhone?`Phone: ${D.dpoPhone}`:""}
|
|
20
|
+
|
|
21
|
+
BREACH DETAILS
|
|
22
|
+
-------------
|
|
23
|
+
Breach Title: ${N.title}
|
|
24
|
+
Date Discovered: ${y(N.discoveredAt)}
|
|
25
|
+
${N.occurredAt?`Date Occurred: ${y(N.occurredAt)}`:"Date Occurred: Unknown"}
|
|
26
|
+
Status: ${N.status.charAt(0).toUpperCase()+N.status.slice(1)}
|
|
27
|
+
|
|
28
|
+
Description of the Breach:
|
|
29
|
+
${N.description}
|
|
30
|
+
|
|
31
|
+
Affected Systems/Applications:
|
|
32
|
+
${N.affectedSystems.join(", ")}
|
|
33
|
+
|
|
34
|
+
Types of Personal Data Involved:
|
|
35
|
+
${N.dataTypes.join(", ")}
|
|
36
|
+
|
|
37
|
+
Estimated Number of Data Subjects Affected:
|
|
38
|
+
${N.estimatedAffectedSubjects||"Unknown"}
|
|
39
|
+
|
|
40
|
+
RISK ASSESSMENT
|
|
41
|
+
--------------
|
|
42
|
+
${x?`
|
|
43
|
+
Overall Risk Level: ${x.riskLevel.charAt(0).toUpperCase()+x.riskLevel.slice(1)}
|
|
44
|
+
Risk to Rights and Freedoms of Data Subjects: ${x.risksToRightsAndFreedoms?"Yes":"No"}
|
|
45
|
+
High Risk to Rights and Freedoms of Data Subjects: ${x.highRisksToRightsAndFreedoms?"Yes":"No"}
|
|
46
|
+
|
|
47
|
+
Justification for Risk Assessment:
|
|
48
|
+
${x.justification}
|
|
49
|
+
`:"Risk assessment has not been conducted yet."}
|
|
50
|
+
|
|
51
|
+
MEASURES TAKEN
|
|
52
|
+
-------------
|
|
53
|
+
Measures taken or proposed to address the breach:
|
|
54
|
+
${N.initialActions||"To be determined"}
|
|
55
|
+
|
|
56
|
+
Measures taken or proposed to mitigate possible adverse effects:
|
|
57
|
+
[Please specify measures taken to mitigate adverse effects]
|
|
58
|
+
|
|
59
|
+
NOTIFICATION TO DATA SUBJECTS (NDPA Section 40(4))
|
|
60
|
+
----------------------------
|
|
61
|
+
Have data subjects been notified: [Yes/No]
|
|
62
|
+
If yes, date of notification: [Date]
|
|
63
|
+
If no, planned date of notification: [Date]
|
|
64
|
+
Reason for delay (if applicable): [Reason]
|
|
65
|
+
|
|
66
|
+
ADDITIONAL INFORMATION
|
|
67
|
+
---------------------
|
|
68
|
+
[Any additional information relevant to the breach]
|
|
69
|
+
|
|
70
|
+
This notification is made in compliance with the Nigeria Data Protection Act (NDPA), Section 40.
|
|
71
|
+
`,te=h=>{h.preventDefault();let j={id:`notification_${Date.now()}`,breachId:N.id,sentAt:Date.now(),method:J,referenceNumber:K||void 0,ndpcContact:d?{name:d,email:E,phone:M||void 0}:void 0,content:C,attachments:[]};oe(j),w(true);},U=()=>{let h=document.createElement("a"),j=new Blob([C],{type:"text/plain"});h.href=URL.createObjectURL(j),h.download=`NDPC_Breach_Notification_${new Date().toISOString().split("T")[0]}.txt`,document.body.appendChild(h),h.click(),document.body.removeChild(h);},ae=()=>[{value:"email",label:"Email"},{value:"portal",label:"NDPC Portal"},{value:"letter",label:"Formal Letter"},{value:"other",label:"Other"}].map(j=>jsxRuntime.jsx("option",{value:j.value,children:j.label},j.value));return jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${ee}`,n.root,p),children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("",n.header,p),children:[jsxRuntime.jsx("h2",{className:chunkE64TU6IU_js.a("text-xl font-bold mb-2",n.title,p),children:ne}),jsxRuntime.jsx("p",{className:"mb-6 text-gray-600 dark:text-gray-300",children:de})]}),k?jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"mb-6 p-4 bg-green-50 dark:bg-green-900/20 rounded-md",children:[jsxRuntime.jsx("h3",{className:"text-lg font-bold text-green-800 dark:text-green-200 mb-2",children:"Report Generated Successfully"}),jsxRuntime.jsx("p",{className:"text-green-700 dark:text-green-300",children:"Your NDPC notification report has been generated and is ready for submission. Please review the report carefully before submitting it to the NDPC."})]}),jsxRuntime.jsxs("div",{className:"mb-6",children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold mb-3",children:"Submission Details"}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("p",{className:chunkE64TU6IU_js.a("text-sm",n.field,p),children:[jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a("font-medium",n.fieldLabel,p),children:"Method:"})," ",jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a("",n.fieldValue,p),children:J.charAt(0).toUpperCase()+J.slice(1)})]}),d&&jsxRuntime.jsxs("p",{className:chunkE64TU6IU_js.a("text-sm",n.field,p),children:[jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a("font-medium",n.fieldLabel,p),children:"Contact Name:"})," ",jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a("",n.fieldValue,p),children:d})]}),E&&jsxRuntime.jsxs("p",{className:chunkE64TU6IU_js.a("text-sm",n.field,p),children:[jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a("font-medium",n.fieldLabel,p),children:"Contact Email:"})," ",jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a("",n.fieldValue,p),children:E})]}),M&&jsxRuntime.jsxs("p",{className:chunkE64TU6IU_js.a("text-sm",n.field,p),children:[jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a("font-medium",n.fieldLabel,p),children:"Contact Phone:"})," ",jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a("",n.fieldValue,p),children:M})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("p",{className:chunkE64TU6IU_js.a("text-sm",n.field,p),children:[jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a("font-medium",n.fieldLabel,p),children:"Date Generated:"})," ",jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a("",n.fieldValue,p),children:y(Date.now())})]}),jsxRuntime.jsxs("p",{className:chunkE64TU6IU_js.a("text-sm",n.field,p),children:[jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a("font-medium",n.fieldLabel,p),children:"Breach ID:"})," ",jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a("",n.fieldValue,p),children:N.id})]}),K&&jsxRuntime.jsxs("p",{className:chunkE64TU6IU_js.a("text-sm",n.field,p),children:[jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a("font-medium",n.fieldLabel,p),children:"Reference Number:"})," ",jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a("",n.fieldValue,p),children:K})]})]})]})]}),P&&jsxRuntime.jsxs("div",{className:"mb-6",children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold mb-3",children:"Report Preview"}),jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("bg-gray-50 dark:bg-gray-700 p-4 rounded-md",n.reportPreview,p),children:jsxRuntime.jsx("pre",{className:"whitespace-pre-wrap text-sm font-mono text-gray-800 dark:text-gray-200",children:C})})]}),jsxRuntime.jsxs("div",{className:"flex flex-wrap gap-3",children:[pe&&jsxRuntime.jsxs("button",{onClick:U,className:chunkE64TU6IU_js.a(`px-4 py-2 bg-[rgb(var(--ndpr-primary))] text-white rounded hover:bg-[rgb(var(--ndpr-primary-hover))] ${u}`,n.secondaryButton||n.downloadButton,p),children:["Download Report (",L.toUpperCase(),")"]}),jsxRuntime.jsx("button",{onClick:()=>w(false),className:`px-4 py-2 bg-gray-200 text-gray-800 dark:bg-gray-700 dark:text-white rounded hover:bg-gray-300 dark:hover:bg-gray-600 ${u}`,children:"Edit Report"})]})]}):jsxRuntime.jsx("form",{onSubmit:te,children:jsxRuntime.jsxs("div",{className:"space-y-6",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold mb-3",children:"Notification Method"}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"method",className:"block text-sm font-medium mb-1",children:["Method of Submission ",jsxRuntime.jsx("span",{className:"text-red-500",children:"*"})]}),jsxRuntime.jsx("select",{id:"method",value:J,onChange:h=>z(h.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",required:true,children:ae()})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"referenceNumber",className:"block text-sm font-medium mb-1",children:"Reference Number (if available)"}),jsxRuntime.jsx("input",{type:"text",id:"referenceNumber",value:K,onChange:h=>V(h.target.value),placeholder:"e.g. NDPC/BR/2024/001",className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]"})]})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold mb-3",children:"NDPC Contact (if known)"}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"contactName",className:"block text-sm font-medium mb-1",children:"Contact Name"}),jsxRuntime.jsx("input",{type:"text",id:"contactName",value:d,onChange:h=>q(h.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"contactEmail",className:"block text-sm font-medium mb-1",children:"Contact Email"}),jsxRuntime.jsx("input",{type:"email",id:"contactEmail",value:E,onChange:h=>O(h.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"contactPhone",className:"block text-sm font-medium mb-1",children:"Contact Phone"}),jsxRuntime.jsx("input",{type:"tel",id:"contactPhone",value:M,onChange:h=>_(h.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]"})]})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold mb-3",children:"Additional Information"}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"additionalInfo",className:"block text-sm font-medium mb-1",children:"Additional Information to Include"}),jsxRuntime.jsx("textarea",{id:"additionalInfo",value:le,onChange:h=>Q(h.target.value),rows:3,placeholder:"Any additional information you want to include in the report",className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]"})]})]}),Z&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold mb-3",children:"Report Content"}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"reportContent",className:"block text-sm font-medium mb-1",children:["Edit Report Content ",jsxRuntime.jsx("span",{className:"text-red-500",children:"*"})]}),jsxRuntime.jsx("textarea",{id:"reportContent",value:C,onChange:h=>I(h.target.value),rows:20,className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))] font-mono text-sm",required:true})]})]}),jsxRuntime.jsxs("div",{className:"mt-6 p-4 bg-blue-50 dark:bg-blue-900/20 rounded-md",children:[jsxRuntime.jsx("h3",{className:"text-sm font-bold text-blue-800 dark:text-blue-200 mb-2",children:"NDPA Breach Notification Requirements"}),jsxRuntime.jsx("p",{className:"text-blue-700 dark:text-blue-300 text-sm",children:"Under the Nigeria Data Protection Act (NDPA), Section 40, data breaches that pose a risk to the rights and freedoms of data subjects must be reported to the NDPC within 72 hours of discovery. This report will help you comply with this requirement."})]}),jsxRuntime.jsx("div",{className:"mt-6",children:jsxRuntime.jsx("button",{type:"submit",className:chunkE64TU6IU_js.a(`px-6 py-3 bg-[rgb(var(--ndpr-primary))] text-white rounded-md hover:bg-[rgb(var(--ndpr-primary-hover))] focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))] focus:ring-offset-2 ${u}`,n.primaryButton||n.generateButton,p),children:me})})]})})]})};exports.a=ze;exports.b=tt;exports.c=dt;exports.d=bt;//# sourceMappingURL=chunk-32UIWTGD.js.map
|
|
72
|
+
//# sourceMappingURL=chunk-32UIWTGD.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import {a as a$1,d,c,b}from'./chunk-QKK5S54L.mjs';import {a}from'./chunk-AYKLAEOU.mjs';import {b as b$1,a as a$2}from'./chunk-WWT2ZSNU.mjs';import {useState,useEffect}from'react';import {jsxs,jsx}from'react/jsx-runtime';var M=[{value:"adequacy_decision",label:"Adequacy Decision (Section 41)"},{value:"standard_clauses",label:"Standard Contractual Clauses (Section 42)"},{value:"binding_corporate_rules",label:"Binding Corporate Rules (Section 43)"},{value:"ndpc_authorization",label:"NDPC Authorization (Section 44)"},{value:"explicit_consent",label:"Explicit Consent (Section 45(a))"},{value:"contract_performance",label:"Contract Performance (Section 45(b))"},{value:"public_interest",label:"Public Interest (Section 45(c))"},{value:"legal_claims",label:"Legal Claims (Section 45(d))"},{value:"vital_interests",label:"Vital Interests (Section 45(e))"}],H=[{value:"adequate",label:"Adequate"},{value:"inadequate",label:"Inadequate"},{value:"pending_review",label:"Pending Review"},{value:"unknown",label:"Unknown"}],Y=[{value:"one_time",label:"One-Time"},{value:"periodic",label:"Periodic"},{value:"continuous",label:"Continuous"}],Q=[{value:"active",label:"Active"},{value:"suspended",label:"Suspended"},{value:"terminated",label:"Terminated"},{value:"pending_approval",label:"Pending Approval"}],W={destinationCountry:"",destinationCountryCode:"",adequacyStatus:"unknown",transferMechanism:"adequacy_decision",dataCategories:"",includesSensitiveData:false,estimatedDataSubjects:"",recipientOrganization:"",recipientContactName:"",recipientContactEmail:"",recipientContactPhone:"",recipientContactAddress:"",purpose:"",safeguards:"",riskAssessment:"",riskLevel:"medium",frequency:"one_time",status:"active",tiaCompleted:false,tiaReference:"",ndpcApprovalApplied:false,ndpcApprovalApproved:false,ndpcApprovalReference:""},xe=({transfers:c$1,onAddTransfer:P,onUpdateTransfer:F,onRemoveTransfer:B,summary:G,title:K="Cross-Border Data Transfer Manager",description:J="Manage and document cross-border personal data transfers in compliance with NDPA 2023 Part VI (Sections 41-45).",className:X="",buttonClassName:T="",showSummary:Z=true,showTIA:ee=true,classNames:r,unstyled:o})=>{let[v,D]=useState(null),[I,x]=useState(false),[y,O]=useState(null),[i,R]=useState(W),[f,_]=useState(null),[C,te]=useState("all"),[A,re]=useState("all"),[k,ae]=useState(c$1);useEffect(()=>{let t=[...c$1];C!=="all"&&(t=t.filter(a=>a.status===C)),A!=="all"&&(t=t.filter(a=>a.transferMechanism===A)),t.sort((a,l)=>l.updatedAt-a.updatedAt),ae(t);},[c$1,C,A]),useEffect(()=>{k.length>0&&!v&&D(k[0].id);},[k,v]);let j=v?c$1.find(t=>t.id===v):null,h=t=>new Date(t).toLocaleDateString(),w=()=>{R(W),O(null),_(null);},ne=()=>{w(),x(true);},ie=t=>{var a,l,u,b;O(t.id),R({destinationCountry:t.destinationCountry,destinationCountryCode:t.destinationCountryCode||"",adequacyStatus:t.adequacyStatus,transferMechanism:t.transferMechanism,dataCategories:t.dataCategories.join(", "),includesSensitiveData:t.includesSensitiveData,estimatedDataSubjects:((a=t.estimatedDataSubjects)==null?void 0:a.toString())||"",recipientOrganization:t.recipientOrganization,recipientContactName:t.recipientContact.name,recipientContactEmail:t.recipientContact.email,recipientContactPhone:t.recipientContact.phone||"",recipientContactAddress:t.recipientContact.address||"",purpose:t.purpose,safeguards:t.safeguards.join(`
|
|
2
|
+
`),riskAssessment:t.riskAssessment,riskLevel:t.riskLevel,frequency:t.frequency,status:t.status,tiaCompleted:t.tiaCompleted,tiaReference:t.tiaReference||"",ndpcApprovalApplied:((l=t.ndpcApproval)==null?void 0:l.applied)||false,ndpcApprovalApproved:((u=t.ndpcApproval)==null?void 0:u.approved)||false,ndpcApprovalReference:((b=t.ndpcApproval)==null?void 0:b.referenceNumber)||""}),x(true);},p=(t,a)=>{R(l=>b$1(a$2({},l),{[t]:a}));},de=()=>{let t=a$1(i.transferMechanism),a=Date.now();return {destinationCountry:i.destinationCountry.trim(),destinationCountryCode:i.destinationCountryCode.trim()||void 0,adequacyStatus:i.adequacyStatus,transferMechanism:i.transferMechanism,dataCategories:i.dataCategories.split(",").map(l=>l.trim()).filter(Boolean),includesSensitiveData:i.includesSensitiveData,estimatedDataSubjects:i.estimatedDataSubjects?parseInt(i.estimatedDataSubjects,10):void 0,recipientOrganization:i.recipientOrganization.trim(),recipientContact:{name:i.recipientContactName.trim(),email:i.recipientContactEmail.trim(),phone:i.recipientContactPhone.trim()||void 0,address:i.recipientContactAddress.trim()||void 0},purpose:i.purpose.trim(),safeguards:i.safeguards.split(`
|
|
3
|
+
`).map(l=>l.trim()).filter(Boolean),riskAssessment:i.riskAssessment.trim(),riskLevel:i.riskLevel,frequency:i.frequency,status:t&&!i.ndpcApprovalApproved?"pending_approval":i.status,tiaCompleted:i.tiaCompleted,tiaReference:i.tiaReference.trim()||void 0,ndpcApproval:t?{required:true,applied:i.ndpcApprovalApplied,approved:i.ndpcApprovalApproved||void 0,referenceNumber:i.ndpcApprovalReference.trim()||void 0,appliedAt:i.ndpcApprovalApplied?a:void 0,approvedAt:i.ndpcApprovalApproved?a:void 0}:void 0,startDate:a,reviewDate:a+365*24*60*60*1e3}},oe=()=>{let t=de(),a=a$2({id:y||"temp",createdAt:Date.now(),updatedAt:Date.now()},t),l=c(a);_(l),l.isValid&&(y?F&&F(y,t):P&&P(t),w(),x(false));},le=t=>{B&&B(t),v===t&&D(null);},E=t=>jsxs("span",{className:a(`px-2 py-1 rounded text-xs font-medium ${{low:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200",medium:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200",high:"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200"}[t]}`,r==null?void 0:r.riskBadge,o),children:[t.charAt(0).toUpperCase()+t.slice(1)," Risk"]}),L=t=>{let a$1={active:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200",suspended:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200",terminated:"bg-gray-100 text-gray-800 dark:bg-gray-900 dark:text-gray-200",pending_approval:"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200"},l={active:"Active",suspended:"Suspended",terminated:"Terminated",pending_approval:"Pending Approval"};return jsx("span",{className:a(`px-2 py-1 rounded text-xs font-medium ${a$1[t]}`,r==null?void 0:r.statusBadge,o),children:l[t]})},pe=t=>{var u;let a=a$1(t),l=((u=M.find(b=>b.value===t))==null?void 0:u.label)||t;return jsx("span",{className:`px-2 py-1 rounded text-xs font-medium ${a?"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200":"bg-teal-100 text-teal-800 dark:bg-teal-900 dark:text-teal-200"}`,children:l})},se=()=>{let t=G||{totalActiveTransfers:c$1.filter(a=>a.status==="active").length,pendingApproval:c$1.filter(a=>{var l,u;return a.status==="pending_approval"||((l=a.ndpcApproval)==null?void 0:l.required)&&!((u=a.ndpcApproval)!=null&&u.approved)}),highRiskTransfers:c$1.filter(a=>a.riskLevel==="high"&&a.status==="active"),missingTIA:c$1.filter(a=>!a.tiaCompleted&&a.status==="active")};return jsxs("div",{className:a("mb-6 grid grid-cols-2 md:grid-cols-4 gap-4",r==null?void 0:r.summary,o),children:[jsxs("div",{className:a("bg-blue-50 dark:bg-blue-900/20 p-4 rounded-lg",r==null?void 0:r.summaryCard,o),children:[jsx("p",{className:"text-2xl font-bold text-blue-800 dark:text-blue-200",children:t.totalActiveTransfers}),jsx("p",{className:"text-sm text-blue-600 dark:text-blue-300",children:"Active Transfers"})]}),jsxs("div",{className:a("bg-purple-50 dark:bg-purple-900/20 p-4 rounded-lg",r==null?void 0:r.summaryCard,o),children:[jsx("p",{className:"text-2xl font-bold text-purple-800 dark:text-purple-200",children:t.pendingApproval.length}),jsx("p",{className:"text-sm text-purple-600 dark:text-purple-300",children:"Pending Approval"})]}),jsxs("div",{className:a("bg-red-50 dark:bg-red-900/20 p-4 rounded-lg",r==null?void 0:r.summaryCard,o),children:[jsx("p",{className:"text-2xl font-bold text-red-800 dark:text-red-200",children:t.highRiskTransfers.length}),jsx("p",{className:"text-sm text-red-600 dark:text-red-300",children:"High Risk"})]}),jsxs("div",{className:a("bg-yellow-50 dark:bg-yellow-900/20 p-4 rounded-lg",r==null?void 0:r.summaryCard,o),children:[jsx("p",{className:"text-2xl font-bold text-yellow-800 dark:text-yellow-200",children:t.missingTIA.length}),jsx("p",{className:"text-sm text-yellow-600 dark:text-yellow-300",children:"Missing TIA"})]})]})},ue=()=>{let t=a$1(i.transferMechanism);return jsxs("div",{className:a("bg-gray-50 dark:bg-gray-700 p-6 rounded-lg mb-6",r==null?void 0:r.form,o),children:[jsxs("div",{className:a("flex justify-between items-center mb-4",r==null?void 0:r.header,o),children:[jsx("h3",{className:"text-lg font-medium",children:y?"Edit Transfer":"Add New Transfer"}),jsx("button",{onClick:()=>{w(),x(false);},className:"text-gray-600 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200",children:"Cancel"})]}),f&&!f.isValid&&jsxs("div",{className:"mb-4 bg-red-50 dark:bg-red-900/20 p-3 rounded-md",children:[jsx("p",{className:"text-sm font-medium text-red-800 dark:text-red-200 mb-1",children:"Please fix the following errors:"}),jsx("ul",{className:"list-disc list-inside text-sm text-red-700 dark:text-red-300",children:f.errors.map((a,l)=>jsx("li",{children:a},l))})]}),f&&f.warnings.length>0&&jsxs("div",{className:"mb-4 bg-yellow-50 dark:bg-yellow-900/20 p-3 rounded-md",children:[jsx("p",{className:"text-sm font-medium text-yellow-800 dark:text-yellow-200 mb-1",children:"Warnings:"}),jsx("ul",{className:"list-disc list-inside text-sm text-yellow-700 dark:text-yellow-300",children:f.warnings.map((a,l)=>jsx("li",{children:a},l))})]}),jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxs("div",{children:[jsxs("label",{className:"block text-sm font-medium mb-1",children:["Destination Country ",jsx("span",{className:"text-red-500",children:"*"})]}),jsx("input",{type:"text",value:i.destinationCountry,onChange:a=>p("destinationCountry",a.target.value),placeholder:"e.g. United Kingdom",className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",r==null?void 0:r.input,o)})]}),jsxs("div",{children:[jsx("label",{className:"block text-sm font-medium mb-1",children:"Country Code (ISO)"}),jsx("input",{type:"text",value:i.destinationCountryCode,onChange:a=>p("destinationCountryCode",a.target.value),placeholder:"e.g. GB",maxLength:3,className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",r==null?void 0:r.input,o)})]}),jsxs("div",{children:[jsxs("label",{className:"block text-sm font-medium mb-1",children:["Recipient Organization ",jsx("span",{className:"text-red-500",children:"*"})]}),jsx("input",{type:"text",value:i.recipientOrganization,onChange:a=>p("recipientOrganization",a.target.value),placeholder:"Organization name",className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",r==null?void 0:r.input,o)})]}),jsxs("div",{children:[jsxs("label",{className:"block text-sm font-medium mb-1",children:["Transfer Mechanism ",jsx("span",{className:"text-red-500",children:"*"})]}),jsx("select",{value:i.transferMechanism,onChange:a=>p("transferMechanism",a.target.value),className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",r==null?void 0:r.select,o),children:M.map(a=>jsx("option",{value:a.value,children:a.label},a.value))})]}),jsxs("div",{children:[jsx("label",{className:"block text-sm font-medium mb-1",children:"Adequacy Status"}),jsx("select",{value:i.adequacyStatus,onChange:a=>p("adequacyStatus",a.target.value),className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",r==null?void 0:r.select,o),children:H.map(a=>jsx("option",{value:a.value,children:a.label},a.value))})]}),jsxs("div",{children:[jsx("label",{className:"block text-sm font-medium mb-1",children:"Risk Level"}),jsxs("select",{value:i.riskLevel,onChange:a=>p("riskLevel",a.target.value),className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",r==null?void 0:r.select,o),children:[jsx("option",{value:"low",children:"Low"}),jsx("option",{value:"medium",children:"Medium"}),jsx("option",{value:"high",children:"High"})]})]}),jsxs("div",{className:"md:col-span-2",children:[jsxs("label",{className:"block text-sm font-medium mb-1",children:["Data Categories ",jsx("span",{className:"text-red-500",children:"*"})]}),jsx("input",{type:"text",value:i.dataCategories,onChange:a=>p("dataCategories",a.target.value),placeholder:"Comma-separated, e.g. Names, Email addresses, Phone numbers",className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",r==null?void 0:r.input,o)})]}),jsxs("div",{className:"flex items-center gap-2",children:[jsx("input",{type:"checkbox",id:"includesSensitiveData",checked:i.includesSensitiveData,onChange:a=>p("includesSensitiveData",a.target.checked),className:"h-4 w-4 text-[rgb(var(--ndpr-primary))] border-gray-300 rounded focus:ring-[rgb(var(--ndpr-ring))]"}),jsx("label",{htmlFor:"includesSensitiveData",className:"text-sm font-medium",children:"Includes sensitive personal data"})]}),jsxs("div",{children:[jsx("label",{className:"block text-sm font-medium mb-1",children:"Estimated Data Subjects"}),jsx("input",{type:"number",value:i.estimatedDataSubjects,onChange:a=>p("estimatedDataSubjects",a.target.value),placeholder:"Number of data subjects",className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",r==null?void 0:r.input,o)})]}),jsxs("div",{children:[jsxs("label",{className:"block text-sm font-medium mb-1",children:["Recipient Contact Name ",jsx("span",{className:"text-red-500",children:"*"})]}),jsx("input",{type:"text",value:i.recipientContactName,onChange:a=>p("recipientContactName",a.target.value),placeholder:"Contact person name",className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",r==null?void 0:r.input,o)})]}),jsxs("div",{children:[jsxs("label",{className:"block text-sm font-medium mb-1",children:["Recipient Contact Email ",jsx("span",{className:"text-red-500",children:"*"})]}),jsx("input",{type:"email",value:i.recipientContactEmail,onChange:a=>p("recipientContactEmail",a.target.value),placeholder:"contact@example.com",className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",r==null?void 0:r.input,o)})]}),jsxs("div",{children:[jsx("label",{className:"block text-sm font-medium mb-1",children:"Recipient Contact Phone"}),jsx("input",{type:"text",value:i.recipientContactPhone,onChange:a=>p("recipientContactPhone",a.target.value),placeholder:"Phone number",className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",r==null?void 0:r.input,o)})]}),jsxs("div",{children:[jsx("label",{className:"block text-sm font-medium mb-1",children:"Recipient Contact Address"}),jsx("input",{type:"text",value:i.recipientContactAddress,onChange:a=>p("recipientContactAddress",a.target.value),placeholder:"Address",className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",r==null?void 0:r.input,o)})]}),jsxs("div",{className:"md:col-span-2",children:[jsxs("label",{className:"block text-sm font-medium mb-1",children:["Purpose of Transfer ",jsx("span",{className:"text-red-500",children:"*"})]}),jsx("textarea",{value:i.purpose,onChange:a=>p("purpose",a.target.value),placeholder:"Describe the purpose of this data transfer",rows:2,className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",r==null?void 0:r.input,o)})]}),jsxs("div",{className:"md:col-span-2",children:[jsxs("label",{className:"block text-sm font-medium mb-1",children:["Safeguards ",jsx("span",{className:"text-red-500",children:"*"})]}),jsx("textarea",{value:i.safeguards,onChange:a=>p("safeguards",a.target.value),placeholder:`One safeguard per line, e.g.
|
|
4
|
+
End-to-end encryption
|
|
5
|
+
Access control policies
|
|
6
|
+
Regular security audits`,rows:3,className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",r==null?void 0:r.input,o)})]}),jsxs("div",{className:"md:col-span-2",children:[jsxs("label",{className:"block text-sm font-medium mb-1",children:["Risk Assessment Summary ",jsx("span",{className:"text-red-500",children:"*"})]}),jsx("textarea",{value:i.riskAssessment,onChange:a=>p("riskAssessment",a.target.value),placeholder:"Summarize the risk assessment for this transfer",rows:2,className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",r==null?void 0:r.input,o)})]}),jsxs("div",{children:[jsx("label",{className:"block text-sm font-medium mb-1",children:"Transfer Frequency"}),jsx("select",{value:i.frequency,onChange:a=>p("frequency",a.target.value),className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",r==null?void 0:r.select,o),children:Y.map(a=>jsx("option",{value:a.value,children:a.label},a.value))})]}),jsxs("div",{children:[jsx("label",{className:"block text-sm font-medium mb-1",children:"Status"}),jsx("select",{value:i.status,onChange:a=>p("status",a.target.value),className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",r==null?void 0:r.select,o),children:Q.map(a=>jsx("option",{value:a.value,children:a.label},a.value))})]})]}),t&&jsxs("div",{className:"mt-4 p-4 bg-blue-50 dark:bg-blue-900/20 rounded-md",children:[jsx("h4",{className:"text-sm font-medium text-blue-800 dark:text-blue-200 mb-3",children:"NDPC Approval Required"}),jsx("p",{className:"text-xs text-blue-700 dark:text-blue-300 mb-3",children:"The selected transfer mechanism requires approval from the Nigeria Data Protection Commission."}),jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx("input",{type:"checkbox",id:"ndpcApprovalApplied",checked:i.ndpcApprovalApplied,onChange:a=>p("ndpcApprovalApplied",a.target.checked),className:"h-4 w-4 text-[rgb(var(--ndpr-primary))] border-gray-300 rounded focus:ring-[rgb(var(--ndpr-ring))]"}),jsx("label",{htmlFor:"ndpcApprovalApplied",className:"text-sm",children:"Application submitted"})]}),jsxs("div",{className:"flex items-center gap-2",children:[jsx("input",{type:"checkbox",id:"ndpcApprovalApproved",checked:i.ndpcApprovalApproved,onChange:a=>p("ndpcApprovalApproved",a.target.checked),className:"h-4 w-4 text-[rgb(var(--ndpr-primary))] border-gray-300 rounded focus:ring-[rgb(var(--ndpr-ring))]"}),jsx("label",{htmlFor:"ndpcApprovalApproved",className:"text-sm",children:"Approval granted"})]}),jsxs("div",{className:"md:col-span-2",children:[jsx("label",{className:"block text-sm font-medium mb-1",children:"NDPC Reference Number"}),jsx("input",{type:"text",value:i.ndpcApprovalReference,onChange:a=>p("ndpcApprovalReference",a.target.value),placeholder:"Reference number (if available)",className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",r==null?void 0:r.input,o)})]})]})]}),ee&&jsxs("div",{className:"mt-4 p-4 bg-gray-100 dark:bg-gray-600 rounded-md",children:[jsx("h4",{className:"text-sm font-medium mb-3",children:"Transfer Impact Assessment"}),jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx("input",{type:"checkbox",id:"tiaCompleted",checked:i.tiaCompleted,onChange:a=>p("tiaCompleted",a.target.checked),className:"h-4 w-4 text-[rgb(var(--ndpr-primary))] border-gray-300 rounded focus:ring-[rgb(var(--ndpr-ring))]"}),jsx("label",{htmlFor:"tiaCompleted",className:"text-sm",children:"TIA completed"})]}),jsxs("div",{children:[jsx("label",{className:"block text-sm font-medium mb-1",children:"TIA Reference"}),jsx("input",{type:"text",value:i.tiaReference,onChange:a=>p("tiaReference",a.target.value),placeholder:"Document reference",className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",r==null?void 0:r.input,o)})]})]})]}),jsxs("div",{className:"mt-4 flex justify-end gap-3",children:[jsx("button",{onClick:()=>{w(),x(false);},className:"px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-600",children:"Cancel"}),jsx("button",{onClick:oe,className:a(`px-4 py-2 bg-[rgb(var(--ndpr-primary))] text-white rounded-md hover:bg-[rgb(var(--ndpr-primary-hover))] ${T}`,(r==null?void 0:r.primaryButton)||(r==null?void 0:r.submitButton),o),children:y?"Update Transfer":"Add Transfer"})]})]})},me=t=>{var u,b$1;let a$1=d(t),l=c(t);return jsxs("div",{className:a("",r==null?void 0:r.detailPanel,o),children:[jsxs("div",{className:"flex justify-between items-start mb-4",children:[jsxs("h3",{className:"text-lg font-medium",children:[t.destinationCountry," \u2014 ",t.recipientOrganization]}),jsxs("div",{className:"flex gap-2",children:[L(t.status),E(t.riskLevel)]})]}),!l.isValid&&jsxs("div",{className:"mb-4 bg-red-50 dark:bg-red-900/20 p-3 rounded-md",children:[jsx("p",{className:"text-sm font-medium text-red-800 dark:text-red-200 mb-1",children:"Compliance Issues"}),jsx("ul",{className:"list-disc list-inside text-sm text-red-700 dark:text-red-300",children:l.errors.map((s,m)=>jsx("li",{children:s},m))})]}),l.warnings.length>0&&jsxs("div",{className:"mb-4 bg-yellow-50 dark:bg-yellow-900/20 p-3 rounded-md",children:[jsx("p",{className:"text-sm font-medium text-yellow-800 dark:text-yellow-200 mb-1",children:"Warnings"}),jsx("ul",{className:"list-disc list-inside text-sm text-yellow-700 dark:text-yellow-300",children:l.warnings.map((s,m)=>jsx("li",{children:s},m))})]}),jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-6",children:[jsxs("div",{children:[jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Destination:"})," ",t.destinationCountry,t.destinationCountryCode?` (${t.destinationCountryCode})`:""]}),jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Adequacy:"})," ",(u=H.find(s=>s.value===t.adequacyStatus))==null?void 0:u.label]}),jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Frequency:"})," ",(b$1=Y.find(s=>s.value===t.frequency))==null?void 0:b$1.label]}),jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Start Date:"})," ",h(t.startDate)]}),t.endDate&&jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"End Date:"})," ",h(t.endDate)]}),t.reviewDate&&jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Next Review:"})," ",h(t.reviewDate)]})]}),jsxs("div",{children:[jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Recipient:"})," ",t.recipientOrganization]}),jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Contact:"})," ",t.recipientContact.name," (",t.recipientContact.email,")"]}),t.estimatedDataSubjects&&jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Data Subjects:"})," ",t.estimatedDataSubjects.toLocaleString()]}),jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Sensitive Data:"})," ",t.includesSensitiveData?"Yes":"No"]})]})]}),jsxs("div",{className:"mb-4",children:[jsx("p",{className:"text-sm font-medium mb-1",children:"Transfer Mechanism"}),jsx("div",{className:"bg-gray-50 dark:bg-gray-700 p-3 rounded-md",children:jsx("p",{className:"text-sm text-gray-700 dark:text-gray-200",children:b(t.transferMechanism)})})]}),jsxs("div",{className:"mb-4",children:[jsx("p",{className:"text-sm font-medium mb-1",children:"Purpose"}),jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 bg-gray-50 dark:bg-gray-700 p-2 rounded-md",children:t.purpose})]}),jsxs("div",{className:"mb-4",children:[jsx("p",{className:"text-sm font-medium mb-1",children:"Data Categories"}),jsx("div",{className:"flex flex-wrap gap-1",children:t.dataCategories.map((s,m)=>jsx("span",{className:"px-2 py-1 bg-gray-100 dark:bg-gray-600 rounded text-xs",children:s},m))})]}),jsxs("div",{className:"mb-4",children:[jsx("p",{className:"text-sm font-medium mb-1",children:"Safeguards"}),jsx("ul",{className:"list-disc list-inside text-sm text-gray-600 dark:text-gray-300",children:t.safeguards.map((s,m)=>jsx("li",{children:s},m))})]}),jsxs("div",{className:"mb-4",children:[jsx("p",{className:"text-sm font-medium mb-1",children:"Risk Assessment"}),jsxs("div",{className:"bg-gray-50 dark:bg-gray-700 p-3 rounded-md",children:[jsx("p",{className:"text-sm text-gray-700 dark:text-gray-200 mb-2",children:t.riskAssessment}),jsxs("div",{className:"mt-2",children:[jsxs("p",{className:"text-xs font-medium text-gray-600 dark:text-gray-400 mb-1",children:["Automated Assessment (Score: ",a$1.riskScore,")"]}),a$1.factors.length>0&&jsx("ul",{className:"list-disc list-inside text-xs text-gray-600 dark:text-gray-400",children:a$1.factors.map((s,m)=>jsx("li",{children:s},m))}),a$1.recommendations.length>0&&jsxs("div",{className:"mt-2",children:[jsx("p",{className:"text-xs font-medium text-gray-600 dark:text-gray-400 mb-1",children:"Recommendations:"}),jsx("ul",{className:"list-disc list-inside text-xs text-gray-600 dark:text-gray-400",children:a$1.recommendations.map((s,m)=>jsx("li",{children:s},m))})]})]})]})]}),t.ndpcApproval&&jsxs("div",{className:"mb-4",children:[jsx("p",{className:"text-sm font-medium mb-1",children:"NDPC Approval"}),jsxs("div",{className:a(`p-3 rounded-md ${t.ndpcApproval.approved?"bg-green-50 dark:bg-green-900/20":t.ndpcApproval.applied?"bg-yellow-50 dark:bg-yellow-900/20":"bg-red-50 dark:bg-red-900/20"}`,r==null?void 0:r.approvalStatus,o),children:[jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Status:"})," ",t.ndpcApproval.approved?"Approved":t.ndpcApproval.applied?"Application Submitted":"Not Applied"]}),t.ndpcApproval.referenceNumber&&jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Reference:"})," ",t.ndpcApproval.referenceNumber]}),t.ndpcApproval.appliedAt&&jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Applied:"})," ",h(t.ndpcApproval.appliedAt)]}),t.ndpcApproval.approvedAt&&jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Approved:"})," ",h(t.ndpcApproval.approvedAt)]})]})]}),jsxs("div",{className:"mb-4",children:[jsx("p",{className:"text-sm font-medium mb-1",children:"Transfer Impact Assessment"}),jsxs("div",{className:`p-3 rounded-md ${t.tiaCompleted?"bg-green-50 dark:bg-green-900/20":"bg-yellow-50 dark:bg-yellow-900/20"}`,children:[jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Status:"})," ",t.tiaCompleted?"Completed":"Not Completed"]}),t.tiaReference&&jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Reference:"})," ",t.tiaReference]})]})]}),jsxs("div",{className:"flex gap-3 mt-6",children:[jsx("button",{onClick:()=>ie(t),className:`px-4 py-2 bg-[rgb(var(--ndpr-primary))] text-white rounded-md hover:bg-[rgb(var(--ndpr-primary-hover))] ${T}`,children:"Edit"}),jsx("button",{onClick:()=>le(t.id),className:"px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700",children:"Remove"})]})]})};return jsxs("div",{className:a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${X}`,r==null?void 0:r.root,o),children:[jsx("h2",{className:a("text-xl font-bold mb-2",r==null?void 0:r.title,o),children:K}),jsx("p",{className:"mb-6 text-gray-600 dark:text-gray-300",children:J}),Z&&se(),!I&&jsx("div",{className:"mb-6",children:jsx("button",{onClick:ne,className:a(`px-4 py-2 bg-[rgb(var(--ndpr-primary))] text-white rounded-md hover:bg-[rgb(var(--ndpr-primary-hover))] ${T}`,(r==null?void 0:r.primaryButton)||(r==null?void 0:r.submitButton),o),children:"Add Transfer"})}),I&&ue(),jsxs("div",{className:"mb-6 grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxs("div",{children:[jsx("label",{htmlFor:"cbStatusFilter",className:"block text-sm font-medium mb-1",children:"Status Filter"}),jsxs("select",{id:"cbStatusFilter",value:C,onChange:t=>te(t.target.value),className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",r==null?void 0:r.select,o),children:[jsx("option",{value:"all",children:"All Statuses"}),Q.map(t=>jsx("option",{value:t.value,children:t.label},t.value))]})]}),jsxs("div",{children:[jsx("label",{htmlFor:"cbMechanismFilter",className:"block text-sm font-medium mb-1",children:"Mechanism Filter"}),jsxs("select",{id:"cbMechanismFilter",value:A,onChange:t=>re(t.target.value),className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",r==null?void 0:r.select,o),children:[jsx("option",{value:"all",children:"All Mechanisms"}),M.map(t=>jsx("option",{value:t.value,children:t.label},t.value))]})]})]}),jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[jsxs("div",{className:"md:col-span-1",children:[jsx("h3",{className:"text-lg font-medium mb-3",children:"Transfers"}),k.length===0?jsx("p",{className:"text-gray-600 dark:text-gray-400 text-sm",children:"No cross-border transfers found."}):jsx("div",{className:a("space-y-2 max-h-96 overflow-y-auto pr-2",r==null?void 0:r.transferList,o),children:k.map(t=>{var a$1,l;return jsxs("div",{className:a(`p-3 rounded-md cursor-pointer ${v===t.id?"bg-[rgb(var(--ndpr-primary)/0.05)] dark:bg-[rgb(var(--ndpr-primary)/0.1)] border border-[rgb(var(--ndpr-primary)/0.2)] dark:border-[rgb(var(--ndpr-primary)/0.3)]":"bg-gray-50 dark:bg-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600"}`,r==null?void 0:r.transferItem,o),onClick:()=>D(t.id),children:[jsxs("div",{className:"flex justify-between items-start mb-1",children:[jsx("h4",{className:"font-medium text-sm",children:t.destinationCountry}),E(t.riskLevel)]}),jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 mb-1",children:t.recipientOrganization}),jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 mb-1",children:pe(t.transferMechanism)}),jsxs("div",{className:"flex justify-between items-center mt-2",children:[L(t.status),((a$1=t.ndpcApproval)==null?void 0:a$1.required)&&!((l=t.ndpcApproval)!=null&&l.approved)&&jsx("span",{className:"text-xs text-purple-600 dark:text-purple-400",children:"NDPC Pending"})]})]},t.id)})})]}),jsx("div",{className:"md:col-span-2",children:j?me(j):jsx("div",{className:"flex items-center justify-center h-64 bg-gray-50 dark:bg-gray-700 rounded-md",children:jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Select a transfer to view details"})})})]})]})};export{xe as a};//# sourceMappingURL=chunk-4JUDKBA2.mjs.map
|
|
7
|
+
//# sourceMappingURL=chunk-4JUDKBA2.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b,d,c,a as a$2}from'./chunk-PYEX7DFR.mjs';import {a}from'./chunk-AYKLAEOU.mjs';import {a as a$1,b as b$1}from'./chunk-WWT2ZSNU.mjs';import {useState,useMemo,useEffect}from'react';import {jsxs,jsx}from'react/jsx-runtime';var I=[{value:"consent",label:"Consent (Section 25(1)(a))"},{value:"contract",label:"Contract (Section 25(1)(b))"},{value:"legal_obligation",label:"Legal Obligation (Section 25(1)(c))"},{value:"vital_interests",label:"Vital Interests (Section 25(1)(d))"},{value:"public_interest",label:"Public Interest (Section 25(1)(e))"},{value:"legitimate_interests",label:"Legitimate Interests (Section 25(1)(f))"}],N=[{value:"active",label:"Active"},{value:"inactive",label:"Inactive"},{value:"archived",label:"Archived"}],ke=[{value:"data_subject",label:"Directly from Data Subject"},{value:"third_party",label:"Third Party"},{value:"public_source",label:"Public Source"},{value:"other",label:"Other"}];function we(){let l=Date.now();return {id:`proc_${l}_${Math.random().toString(36).substring(2,11)}`,name:"",description:"",controllerDetails:{name:"",contact:"",address:""},lawfulBasis:"consent",lawfulBasisJustification:"",purposes:[],dataCategories:[],dataSubjectCategories:[],recipients:[],retentionPeriod:"",securityMeasures:[],dataSource:"data_subject",dpiaRequired:false,automatedDecisionMaking:false,status:"active",createdAt:l,updatedAt:l}}function ee(l){return l?new Date(l).toLocaleDateString():"N/A"}var Pe=({ropa:l,onAddRecord:R,onUpdateRecord:S,onArchiveRecord:P,title:te="Record of Processing Activities (ROPA)",description:re="Maintain a comprehensive record of all data processing activities as required by the NDPA accountability principle.",className:ae="",buttonClassName:A="",classNames:e,unstyled:d$1})=>{let[b$2,v]=useState("list"),[w,ie]=useState(""),[C,oe]=useState("all"),[D,de]=useState("all"),[n,x]=useState(null),[M,h]=useState([]),[O,L]=useState(""),[j,_]=useState(""),[E,T]=useState(""),[U,$]=useState(""),[J,q]=useState(""),[V,G]=useState(""),[z,H]=useState(""),c$1=useMemo(()=>b(l),[l]),f=useMemo(()=>d(l),[l]),W=useMemo(()=>{let a=[...l.records];if(C!=="all"&&(a=a.filter(r=>r.status===C)),D!=="all"&&(a=a.filter(r=>r.lawfulBasis===D)),w){let r=w.toLowerCase();a=a.filter(u=>u.name.toLowerCase().includes(r)||u.description.toLowerCase().includes(r)||u.dataCategories.some(p=>p.toLowerCase().includes(r))||u.department&&u.department.toLowerCase().includes(r));}return a},[l.records,C,D,w]);useEffect(()=>{n&&(L(n.purposes.join(", ")),_(n.dataCategories.join(", ")),T((n.sensitiveDataCategories||[]).join(", ")),$(n.dataSubjectCategories.join(", ")),q(n.recipients.join(", ")),G(n.securityMeasures.join(", ")),H((n.systemsUsed||[]).join(", ")));},[n==null?void 0:n.id]);let ne=()=>{let a=we();a.controllerDetails.name=l.organizationName,a.controllerDetails.contact=l.organizationContact,a.controllerDetails.address=l.organizationAddress,l.ndpcRegistrationNumber&&(a.controllerDetails.registrationNumber=l.ndpcRegistrationNumber),l.dpoDetails&&(a.controllerDetails.dpoContact=l.dpoDetails.email),x(a),h([]),v("form");},le=a=>{x(a$1({},a)),h([]),v("form");},m=a=>a.split(",").map(r=>r.trim()).filter(r=>r.length>0),ue=()=>{if(!n)return;let a=b$1(a$1({},n),{purposes:m(O),dataCategories:m(j),sensitiveDataCategories:m(E),dataSubjectCategories:m(U),recipients:m(J),securityMeasures:m(V),systemsUsed:m(z),updatedAt:Date.now()});a.sensitiveDataCategories&&a.sensitiveDataCategories.length===0&&(a.sensitiveDataCategories=void 0),a.systemsUsed&&a.systemsUsed.length===0&&(a.systemsUsed=void 0);let r=a$2(a);if(!r.valid){h(r.errors);return}l.records.find(p=>p.id===a.id)?S==null||S(a.id,a):R==null||R(a),x(null),h([]),v("list");},ge=a=>{P==null||P(a);},se=()=>{let a=c(l),r=new Blob([a],{type:"text/csv;charset=utf-8;"}),u=URL.createObjectURL(r),p=document.createElement("a");p.href=u,p.download=`ropa_${l.organizationName.replace(/\s+/g,"_").toLowerCase()}_${new Date().toISOString().slice(0,10)}.csv`,p.click(),setTimeout(()=>URL.revokeObjectURL(u),100);},K=()=>{x(null),h([]),v("list");},g=(a,r)=>{n&&x(u=>u&&b$1(a$1({},u),{[a]:r}));},B=(a,r)=>{n&&x(u=>u&&b$1(a$1({},u),{controllerDetails:b$1(a$1({},u.controllerDetails),{[a]:r})}));},ce=a=>!!a.nextReviewDate&&a.nextReviewDate<=Date.now(),pe=a$1=>{let r={active:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200",inactive:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200",archived:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"},u={active:"Active",inactive:"Inactive",archived:"Archived"};return jsx("span",{className:a(`px-2 py-1 rounded text-xs font-medium ${r[a$1]}`,e==null?void 0:e.statusBadge,d$1),children:u[a$1]})},me=a=>jsx("span",{className:"px-2 py-1 rounded text-xs font-medium bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200",children:{consent:"Consent",contract:"Contract",legal_obligation:"Legal Obligation",vital_interests:"Vital Interests",public_interest:"Public Interest",legitimate_interests:"Legitimate Interests"}[a]}),be=()=>jsxs("div",{className:a("mb-6 p-4 bg-gray-50 dark:bg-gray-700 rounded-md",e==null?void 0:e.orgInfo,d$1),children:[jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[jsxs("div",{children:[jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"Organization"}),jsx("p",{className:"text-sm font-semibold",children:l.organizationName})]}),l.dpoDetails&&jsxs("div",{children:[jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"Data Protection Officer"}),jsx("p",{className:"text-sm font-semibold",children:l.dpoDetails.name}),jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:l.dpoDetails.email})]}),l.ndpcRegistrationNumber&&jsxs("div",{children:[jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"NDPC Registration No."}),jsx("p",{className:"text-sm font-semibold",children:l.ndpcRegistrationNumber})]})]}),jsxs("div",{className:"mt-2 text-xs text-gray-600 dark:text-gray-400",children:["Version ",l.version," | Last Updated: ",ee(l.lastUpdated)]})]}),ve=()=>jsxs("div",{className:a("mb-6",e==null?void 0:e.summary,d$1),children:[jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-4",children:[jsxs("div",{className:a("p-4 bg-blue-50 dark:bg-blue-900/20 rounded-md text-center",e==null?void 0:e.summaryCard,d$1),children:[jsx("p",{className:"text-2xl font-bold text-blue-700 dark:text-blue-300",children:c$1.totalRecords}),jsx("p",{className:"text-xs text-blue-600 dark:text-blue-400",children:"Total Records"})]}),jsxs("div",{className:a("p-4 bg-green-50 dark:bg-green-900/20 rounded-md text-center",e==null?void 0:e.summaryCard,d$1),children:[jsx("p",{className:"text-2xl font-bold text-green-700 dark:text-green-300",children:c$1.activeRecords}),jsx("p",{className:"text-xs text-green-600 dark:text-green-400",children:"Active"})]}),jsxs("div",{className:a("p-4 bg-purple-50 dark:bg-purple-900/20 rounded-md text-center",e==null?void 0:e.summaryCard,d$1),children:[jsx("p",{className:"text-2xl font-bold text-purple-700 dark:text-purple-300",children:c$1.crossBorderRecords}),jsx("p",{className:"text-xs text-purple-600 dark:text-purple-400",children:"Cross-Border"})]}),jsxs("div",{className:a("p-4 bg-orange-50 dark:bg-orange-900/20 rounded-md text-center",e==null?void 0:e.summaryCard,d$1),children:[jsx("p",{className:"text-2xl font-bold text-orange-700 dark:text-orange-300",children:f.length}),jsx("p",{className:"text-xs text-orange-600 dark:text-orange-400",children:"Records with Gaps"})]})]}),jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 mb-4",children:[jsxs("div",{className:"p-3 bg-gray-50 dark:bg-gray-700 rounded-md",children:[jsx("p",{className:"text-sm font-medium mb-2",children:"By Lawful Basis"}),I.map(a=>jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsx("span",{className:"text-gray-600 dark:text-gray-400",children:a.label.split(" (")[0]}),jsx("span",{className:"font-medium",children:c$1.byLawfulBasis[a.value]||0})]},a.value))]}),jsxs("div",{className:"p-3 bg-gray-50 dark:bg-gray-700 rounded-md",children:[jsx("p",{className:"text-sm font-medium mb-2",children:"Risk Indicators"}),jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Sensitive Data"}),jsx("span",{className:"font-medium",children:c$1.sensitiveDataRecords})]}),jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"DPIA Required"}),jsx("span",{className:"font-medium",children:c$1.dpiaRequiredRecords})]}),jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Automated Decisions"}),jsx("span",{className:"font-medium",children:c$1.automatedDecisionRecords})]}),jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Due for Review"}),jsx("span",{className:`font-medium ${c$1.recordsDueForReview.length>0?"text-red-600 dark:text-red-400":""}`,children:c$1.recordsDueForReview.length})]})]}),c$1.topDepartments.length>0&&jsxs("div",{className:"p-3 bg-gray-50 dark:bg-gray-700 rounded-md",children:[jsx("p",{className:"text-sm font-medium mb-2",children:"Top Departments"}),c$1.topDepartments.slice(0,5).map(a=>jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsx("span",{className:"text-gray-600 dark:text-gray-400",children:a.department}),jsx("span",{className:"font-medium",children:a.count})]},a.department))]})]}),f.length>0&&jsxs("div",{className:a("p-3 bg-red-50 dark:bg-red-900/20 rounded-md",e==null?void 0:e.complianceGap,d$1),children:[jsx("p",{className:"text-sm font-medium text-red-800 dark:text-red-200 mb-2",children:"Compliance Gaps Detected"}),f.slice(0,5).map(a=>jsxs("div",{className:"mb-2",children:[jsx("p",{className:"text-xs font-medium text-red-700 dark:text-red-300",children:a.recordName}),jsx("ul",{className:"list-disc list-inside",children:a.gaps.map((r,u)=>jsx("li",{className:"text-xs text-red-600 dark:text-red-400",children:r},u))})]},a.recordId)),f.length>5&&jsxs("p",{className:"text-xs text-red-600 dark:text-red-400 mt-1",children:["...and ",f.length-5," more record(s) with gaps."]})]})]}),xe=()=>jsxs("div",{children:[jsxs("div",{className:"mb-4 grid grid-cols-1 md:grid-cols-4 gap-4",children:[jsxs("div",{children:[jsx("label",{htmlFor:"ropaSearch",className:"block text-sm font-medium mb-1",children:"Search"}),jsx("input",{type:"text",id:"ropaSearch",value:w,onChange:a=>ie(a.target.value),placeholder:"Search records...",className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d$1)})]}),jsxs("div",{children:[jsx("label",{htmlFor:"ropaStatusFilter",className:"block text-sm font-medium mb-1",children:"Status"}),jsxs("select",{id:"ropaStatusFilter",value:C,onChange:a=>oe(a.target.value),className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.select,d$1),children:[jsx("option",{value:"all",children:"All Statuses"}),N.map(a=>jsx("option",{value:a.value,children:a.label},a.value))]})]}),jsxs("div",{children:[jsx("label",{htmlFor:"ropaBasisFilter",className:"block text-sm font-medium mb-1",children:"Lawful Basis"}),jsxs("select",{id:"ropaBasisFilter",value:D,onChange:a=>de(a.target.value),className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.select,d$1),children:[jsx("option",{value:"all",children:"All Bases"}),I.map(a=>jsx("option",{value:a.value,children:a.label.split(" (")[0]},a.value))]})]}),jsxs("div",{className:"flex items-end space-x-2",children:[jsx("button",{onClick:ne,className:a(`px-4 py-2 bg-[rgb(var(--ndpr-primary))] text-white rounded hover:bg-[rgb(var(--ndpr-primary-hover))] text-sm ${A}`,(e==null?void 0:e.primaryButton)||(e==null?void 0:e.submitButton),d$1),children:"Add Record"}),jsx("button",{onClick:se,className:a(`px-4 py-2 bg-gray-600 text-white rounded hover:bg-gray-700 text-sm ${A}`,(e==null?void 0:e.secondaryButton)||(e==null?void 0:e.exportButton),d$1),children:"Export CSV"})]})]}),W.length===0?jsx("p",{className:"text-gray-600 dark:text-gray-400 text-sm text-center py-8",children:"No processing records found."}):jsx("div",{className:"overflow-x-auto",children:jsxs("table",{className:a("w-full text-sm text-left",e==null?void 0:e.table,d$1),children:[jsx("thead",{className:a("text-xs uppercase bg-gray-50 dark:bg-gray-700",e==null?void 0:e.tableHeader,d$1),children:jsxs("tr",{children:[jsx("th",{className:"px-4 py-3",children:"Name"}),jsx("th",{className:"px-4 py-3",children:"Lawful Basis"}),jsx("th",{className:"px-4 py-3",children:"Data Categories"}),jsx("th",{className:"px-4 py-3",children:"Status"}),jsx("th",{className:"px-4 py-3",children:"Last Reviewed"}),jsx("th",{className:"px-4 py-3",children:"Actions"})]})}),jsx("tbody",{children:W.map(a$1=>{let r=ce(a$1),u=f.some(p=>p.recordId===a$1.id);return jsxs("tr",{className:a(`border-b dark:border-gray-600 ${r?"bg-red-50 dark:bg-red-900/10":u?"bg-yellow-50 dark:bg-yellow-900/10":"bg-white dark:bg-gray-800"} hover:bg-gray-50 dark:hover:bg-gray-700`,e==null?void 0:e.tableRow,d$1),children:[jsx("td",{className:"px-4 py-3",children:jsxs("div",{children:[jsx("p",{className:"font-medium",children:a$1.name}),a$1.department&&jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:a$1.department}),r&&jsx("span",{className:"text-xs text-red-600 dark:text-red-400 font-medium",children:"Review Overdue"})]})}),jsx("td",{className:"px-4 py-3",children:me(a$1.lawfulBasis)}),jsx("td",{className:"px-4 py-3",children:jsx("p",{className:"text-xs text-gray-600 dark:text-gray-300 max-w-xs truncate",children:a$1.dataCategories.join(", ")})}),jsx("td",{className:"px-4 py-3",children:pe(a$1.status)}),jsx("td",{className:"px-4 py-3 text-xs text-gray-600 dark:text-gray-400",children:ee(a$1.lastReviewedAt)}),jsx("td",{className:"px-4 py-3",children:jsxs("div",{className:"flex space-x-2",children:[jsx("button",{onClick:()=>le(a$1),className:"text-[rgb(var(--ndpr-primary))] dark:text-[rgb(var(--ndpr-primary))] hover:underline text-xs",children:"Edit"}),a$1.status!=="archived"&&jsx("button",{onClick:()=>ge(a$1.id),className:"text-gray-600 dark:text-gray-400 hover:underline text-xs",children:"Archive"})]})})]},a$1.id)})})]})})]}),fe=()=>{if(!n)return null;let a$1=!l.records.find(r=>r.id===n.id);return jsxs("div",{className:a("",e==null?void 0:e.form,d$1),children:[jsxs("div",{className:a("flex justify-between items-center mb-4",e==null?void 0:e.header,d$1),children:[jsx("h3",{className:"text-lg font-medium",children:a$1?"Add Processing Record":"Edit Processing Record"}),jsx("button",{onClick:K,className:"text-gray-600 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 text-sm",children:"Cancel"})]}),M.length>0&&jsxs("div",{className:"mb-4 p-3 bg-red-50 dark:bg-red-900/20 rounded-md",children:[jsx("p",{className:"text-sm font-medium text-red-800 dark:text-red-200 mb-1",children:"Please fix the following errors:"}),jsx("ul",{className:"list-disc list-inside",children:M.map((r,u)=>jsx("li",{className:"text-xs text-red-600 dark:text-red-400",children:r},u))})]}),jsxs("div",{className:"space-y-6",children:[jsxs("fieldset",{className:"border border-gray-200 dark:border-gray-600 rounded-md p-4",children:[jsx("legend",{className:"text-sm font-medium px-2",children:"Basic Information"}),jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxs("div",{children:[jsx("label",{htmlFor:"recordName",className:"block text-sm font-medium mb-1",children:"Activity Name *"}),jsx("input",{type:"text",id:"recordName",value:n.name,onChange:r=>g("name",r.target.value),className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d$1),placeholder:"e.g., Customer Account Management"})]}),jsxs("div",{children:[jsx("label",{htmlFor:"recordDepartment",className:"block text-sm font-medium mb-1",children:"Department"}),jsx("input",{type:"text",id:"recordDepartment",value:n.department||"",onChange:r=>g("department",r.target.value||void 0),className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d$1),placeholder:"e.g., Marketing"})]}),jsxs("div",{className:"md:col-span-2",children:[jsx("label",{htmlFor:"recordDescription",className:"block text-sm font-medium mb-1",children:"Description *"}),jsx("textarea",{id:"recordDescription",value:n.description,onChange:r=>g("description",r.target.value),rows:3,className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d$1),placeholder:"Describe what personal data processing is performed..."})]}),jsxs("div",{children:[jsx("label",{htmlFor:"recordStatus",className:"block text-sm font-medium mb-1",children:"Status *"}),jsx("select",{id:"recordStatus",value:n.status,onChange:r=>g("status",r.target.value),className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.select,d$1),children:N.map(r=>jsx("option",{value:r.value,children:r.label},r.value))})]})]})]}),jsxs("fieldset",{className:"border border-gray-200 dark:border-gray-600 rounded-md p-4",children:[jsx("legend",{className:"text-sm font-medium px-2",children:"Controller Details"}),jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxs("div",{children:[jsx("label",{htmlFor:"controllerName",className:"block text-sm font-medium mb-1",children:"Controller Name *"}),jsx("input",{type:"text",id:"controllerName",value:n.controllerDetails.name,onChange:r=>B("name",r.target.value),className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d$1)})]}),jsxs("div",{children:[jsx("label",{htmlFor:"controllerContact",className:"block text-sm font-medium mb-1",children:"Controller Contact *"}),jsx("input",{type:"text",id:"controllerContact",value:n.controllerDetails.contact,onChange:r=>B("contact",r.target.value),className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d$1)})]}),jsxs("div",{className:"md:col-span-2",children:[jsx("label",{htmlFor:"controllerAddress",className:"block text-sm font-medium mb-1",children:"Controller Address *"}),jsx("input",{type:"text",id:"controllerAddress",value:n.controllerDetails.address,onChange:r=>B("address",r.target.value),className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d$1)})]})]})]}),jsxs("fieldset",{className:"border border-gray-200 dark:border-gray-600 rounded-md p-4",children:[jsx("legend",{className:"text-sm font-medium px-2",children:"Lawful Basis (NDPA Section 25)"}),jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxs("div",{children:[jsx("label",{htmlFor:"lawfulBasis",className:"block text-sm font-medium mb-1",children:"Lawful Basis *"}),jsx("select",{id:"lawfulBasis",value:n.lawfulBasis,onChange:r=>g("lawfulBasis",r.target.value),className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.select,d$1),children:I.map(r=>jsx("option",{value:r.value,children:r.label},r.value))})]}),jsxs("div",{children:[jsx("label",{htmlFor:"lawfulBasisJustification",className:"block text-sm font-medium mb-1",children:"Justification *"}),jsx("textarea",{id:"lawfulBasisJustification",value:n.lawfulBasisJustification,onChange:r=>g("lawfulBasisJustification",r.target.value),rows:2,className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d$1),placeholder:"Explain why this lawful basis applies..."})]})]})]}),jsxs("fieldset",{className:"border border-gray-200 dark:border-gray-600 rounded-md p-4",children:[jsx("legend",{className:"text-sm font-medium px-2",children:"Data Details"}),jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxs("div",{children:[jsx("label",{htmlFor:"purposes",className:"block text-sm font-medium mb-1",children:"Purposes * (comma-separated)"}),jsx("input",{type:"text",id:"purposes",value:O,onChange:r=>L(r.target.value),className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d$1),placeholder:"e.g., Account management, Service delivery"})]}),jsxs("div",{children:[jsx("label",{htmlFor:"dataCategories",className:"block text-sm font-medium mb-1",children:"Data Categories * (comma-separated)"}),jsx("input",{type:"text",id:"dataCategories",value:j,onChange:r=>_(r.target.value),className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d$1),placeholder:"e.g., Name, Email, Phone number"})]}),jsxs("div",{children:[jsx("label",{htmlFor:"sensitiveData",className:"block text-sm font-medium mb-1",children:"Sensitive Data Categories (comma-separated)"}),jsx("input",{type:"text",id:"sensitiveData",value:E,onChange:r=>T(r.target.value),className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d$1),placeholder:"e.g., Health data, Biometric data"})]}),jsxs("div",{children:[jsx("label",{htmlFor:"subjectCategories",className:"block text-sm font-medium mb-1",children:"Data Subject Categories * (comma-separated)"}),jsx("input",{type:"text",id:"subjectCategories",value:U,onChange:r=>$(r.target.value),className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d$1),placeholder:"e.g., Customers, Employees"})]}),jsxs("div",{children:[jsx("label",{htmlFor:"recipients",className:"block text-sm font-medium mb-1",children:"Recipients * (comma-separated)"}),jsx("input",{type:"text",id:"recipients",value:J,onChange:r=>q(r.target.value),className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d$1),placeholder:"e.g., Payment processors, Cloud service providers"})]}),jsxs("div",{children:[jsx("label",{htmlFor:"dataSource",className:"block text-sm font-medium mb-1",children:"Data Source *"}),jsx("select",{id:"dataSource",value:n.dataSource,onChange:r=>g("dataSource",r.target.value),className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.select,d$1),children:ke.map(r=>jsx("option",{value:r.value,children:r.label},r.value))})]}),n.dataSource==="third_party"&&jsxs("div",{className:"md:col-span-2",children:[jsx("label",{htmlFor:"thirdPartyDetails",className:"block text-sm font-medium mb-1",children:"Third-Party Source Details *"}),jsx("input",{type:"text",id:"thirdPartyDetails",value:n.thirdPartySourceDetails||"",onChange:r=>g("thirdPartySourceDetails",r.target.value||void 0),className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d$1),placeholder:"Describe the third-party data source..."})]})]})]}),jsxs("fieldset",{className:"border border-gray-200 dark:border-gray-600 rounded-md p-4",children:[jsx("legend",{className:"text-sm font-medium px-2",children:"Retention and Security"}),jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxs("div",{children:[jsx("label",{htmlFor:"retentionPeriod",className:"block text-sm font-medium mb-1",children:"Retention Period *"}),jsx("input",{type:"text",id:"retentionPeriod",value:n.retentionPeriod,onChange:r=>g("retentionPeriod",r.target.value),className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d$1),placeholder:"e.g., 5 years after account closure"})]}),jsxs("div",{children:[jsx("label",{htmlFor:"retentionJustification",className:"block text-sm font-medium mb-1",children:"Retention Justification"}),jsx("input",{type:"text",id:"retentionJustification",value:n.retentionJustification||"",onChange:r=>g("retentionJustification",r.target.value||void 0),className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d$1),placeholder:"Why this retention period is necessary..."})]}),jsxs("div",{className:"md:col-span-2",children:[jsx("label",{htmlFor:"securityMeasures",className:"block text-sm font-medium mb-1",children:"Security Measures * (comma-separated)"}),jsx("input",{type:"text",id:"securityMeasures",value:V,onChange:r=>G(r.target.value),className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d$1),placeholder:"e.g., Encryption at rest, Access controls, Audit logging"})]}),jsxs("div",{children:[jsx("label",{htmlFor:"systemsUsed",className:"block text-sm font-medium mb-1",children:"Systems Used (comma-separated)"}),jsx("input",{type:"text",id:"systemsUsed",value:z,onChange:r=>H(r.target.value),className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d$1),placeholder:"e.g., CRM, ERP, Cloud Storage"})]})]})]}),jsxs("fieldset",{className:"border border-gray-200 dark:border-gray-600 rounded-md p-4",children:[jsx("legend",{className:"text-sm font-medium px-2",children:"Risk Indicators"}),jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxs("div",{className:"flex items-center space-x-2",children:[jsx("input",{type:"checkbox",id:"dpiaRequired",checked:n.dpiaRequired,onChange:r=>g("dpiaRequired",r.target.checked),className:"rounded border-gray-300 dark:border-gray-600"}),jsx("label",{htmlFor:"dpiaRequired",className:"text-sm font-medium",children:"DPIA Required"})]}),n.dpiaRequired&&jsxs("div",{children:[jsx("label",{htmlFor:"dpiaReference",className:"block text-sm font-medium mb-1",children:"DPIA Reference *"}),jsx("input",{type:"text",id:"dpiaReference",value:n.dpiaReference||"",onChange:r=>g("dpiaReference",r.target.value||void 0),className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d$1),placeholder:"Reference to the completed DPIA"})]}),jsxs("div",{className:"flex items-center space-x-2",children:[jsx("input",{type:"checkbox",id:"automatedDecisionMaking",checked:n.automatedDecisionMaking,onChange:r=>g("automatedDecisionMaking",r.target.checked),className:"rounded border-gray-300 dark:border-gray-600"}),jsx("label",{htmlFor:"automatedDecisionMaking",className:"text-sm font-medium",children:"Automated Decision-Making"})]}),n.automatedDecisionMaking&&jsxs("div",{children:[jsx("label",{htmlFor:"automatedDecisionMakingDetails",className:"block text-sm font-medium mb-1",children:"Automated Decision-Making Details *"}),jsx("textarea",{id:"automatedDecisionMakingDetails",value:n.automatedDecisionMakingDetails||"",onChange:r=>g("automatedDecisionMakingDetails",r.target.value||void 0),rows:2,className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d$1),placeholder:"Describe the automated decision-making process..."})]})]})]}),jsxs("fieldset",{className:"border border-gray-200 dark:border-gray-600 rounded-md p-4",children:[jsx("legend",{className:"text-sm font-medium px-2",children:"Review Schedule"}),jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:jsxs("div",{children:[jsx("label",{htmlFor:"nextReviewDate",className:"block text-sm font-medium mb-1",children:"Next Review Date"}),jsx("input",{type:"date",id:"nextReviewDate",value:n.nextReviewDate?new Date(n.nextReviewDate).toISOString().slice(0,10):"",onChange:r=>g("nextReviewDate",r.target.value?new Date(r.target.value).getTime():void 0),className:a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d$1)})]})})]}),jsxs("div",{className:"flex justify-end space-x-3",children:[jsx("button",{onClick:K,className:"px-4 py-2 border border-gray-300 dark:border-gray-600 rounded hover:bg-gray-50 dark:hover:bg-gray-700 text-sm",children:"Cancel"}),jsx("button",{onClick:ue,className:a(`px-4 py-2 bg-[rgb(var(--ndpr-primary))] text-white rounded hover:bg-[rgb(var(--ndpr-primary-hover))] text-sm ${A}`,(e==null?void 0:e.primaryButton)||(e==null?void 0:e.submitButton),d$1),children:a$1?"Add Record":"Save Changes"})]})]})]})},ye=()=>jsxs("div",{className:"flex space-x-4 mb-6 border-b border-gray-200 dark:border-gray-600",children:[jsx("button",{onClick:()=>v("list"),className:`pb-2 text-sm font-medium ${b$2==="list"?"border-b-2 border-[rgb(var(--ndpr-primary))] text-[rgb(var(--ndpr-primary))] dark:text-[rgb(var(--ndpr-primary))]":"text-gray-600 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300"}`,children:"Processing Records"}),jsx("button",{onClick:()=>v("summary"),className:`pb-2 text-sm font-medium ${b$2==="summary"?"border-b-2 border-[rgb(var(--ndpr-primary))] text-[rgb(var(--ndpr-primary))] dark:text-[rgb(var(--ndpr-primary))]":"text-gray-600 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300"}`,children:"Compliance Summary"})]});return jsxs("div",{className:a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${ae}`,e==null?void 0:e.root,d$1),children:[jsx("h2",{className:a("text-xl font-bold mb-2",e==null?void 0:e.title,d$1),children:te}),jsx("p",{className:"mb-6 text-gray-600 dark:text-gray-300",children:re}),be(),b$2!=="form"&&ye(),b$2==="list"&&xe(),b$2==="summary"&&ve(),b$2==="form"&&fe()]})};export{Pe as a};//# sourceMappingURL=chunk-4VVARDN2.mjs.map
|
|
2
|
+
//# sourceMappingURL=chunk-4VVARDN2.mjs.map
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
'use strict';var chunkMQFZHA2D_js=require('./chunk-MQFZHA2D.js');function f(i,u){if(typeof i=="string"){let a=i,o=u,r=a,n=/\{\{([^}]+)\}\}/g,c;for(;(c=n.exec(a))!==null;){let e=c[1].trim(),t=o[e]||"";r=r.replace(new RegExp(`\\{\\{\\s*${e}\\s*\\}\\}`,"g"),t);}return r}else {let a=i,o=u,r={},n=[];return a.filter(e=>e.included).sort((e,t)=>(e.order||0)-(t.order||0)).forEach(e=>{let t=e.template||e.customContent||e.defaultContent||"",m=/\{\{([^}]+)\}\}/g,p,g=[];for(;(p=m.exec(t))!==null;)g.push(p[1].trim());g.forEach(s=>{let l="";s in o&&(l=o[s]||""),l||n.push(s),t=t.replace(new RegExp(`\\{\\{\\s*${s}\\s*\\}\\}`,"g"),l);}),r[e.id]=t;}),{fullText:Object.values(r).join(`
|
|
2
|
+
|
|
3
|
+
`),sectionTexts:r,missingVariables:Array.from(new Set(n))}}}var h=[{id:"data-collection",title:"Data Collection",description:"Describes what personal data is collected and how it is obtained.",order:1,required:true,included:true,template:'{{orgName}} ("we", "us", or "our") collects personal data from users of our services at {{website}}. We collect information you provide directly, such as your name, email address, phone number, and any other details you submit through forms or communications. We may also collect data automatically, including IP addresses, browser type, device information, and usage patterns through cookies and similar technologies. All data collection is conducted in accordance with the Nigeria Data Protection Act (NDPA) 2023.',variables:["orgName","website"]},{id:"legal-basis",title:"Legal Basis for Processing",description:"Specifies the lawful basis for processing personal data under the NDPA.",order:2,required:true,included:true,template:`{{orgName}} processes personal data under one or more of the following lawful bases as prescribed by the NDPA 2023:
|
|
4
|
+
|
|
5
|
+
- Consent: where you have given clear, informed, and voluntary consent for a specific purpose.
|
|
6
|
+
- Contract: where processing is necessary to fulfil a contract with you or to take steps at your request before entering a contract.
|
|
7
|
+
- Legal obligation: where processing is required to comply with applicable Nigerian law.
|
|
8
|
+
- Vital interest: where processing is necessary to protect your life or that of another person.
|
|
9
|
+
- Public interest: where processing is necessary for the performance of a task carried out in the public interest.
|
|
10
|
+
- Legitimate interest: where processing is necessary for our legitimate interests, provided these are not overridden by your rights and freedoms.`,variables:["orgName"]},{id:"data-usage",title:"Data Usage",description:"Explains the purposes for which personal data is processed.",order:3,required:true,included:true,template:`We use the personal data we collect for the following purposes:
|
|
11
|
+
|
|
12
|
+
- Providing and improving our services at {{website}}.
|
|
13
|
+
- Communicating with you regarding your account, enquiries, or support requests.
|
|
14
|
+
- Sending relevant updates, where you have opted in to receive them.
|
|
15
|
+
- Ensuring the security and integrity of our platform.
|
|
16
|
+
- Complying with legal and regulatory obligations under Nigerian law.
|
|
17
|
+
- Conducting analytics to improve user experience and service quality.
|
|
18
|
+
|
|
19
|
+
We will not process your data for purposes incompatible with those stated above without providing you with notice and, where required, obtaining your consent.`,variables:["website"]},{id:"data-sharing",title:"Data Sharing and Disclosure",description:"Details when and with whom personal data may be shared.",order:4,required:true,included:true,template:`{{orgName}} does not sell personal data. We may share your data with the following categories of recipients:
|
|
20
|
+
|
|
21
|
+
- Service providers and processors who assist us in operating our services, under strict data processing agreements.
|
|
22
|
+
- Regulatory and law enforcement authorities when required by Nigerian law or valid legal process.
|
|
23
|
+
- Professional advisers, including lawyers, auditors, and insurers, where necessary.
|
|
24
|
+
- Business partners, only with your explicit consent and for clearly stated purposes.
|
|
25
|
+
|
|
26
|
+
Any cross-border transfer of personal data will comply with the requirements of the NDPA 2023, including ensuring adequate safeguards are in place in the receiving jurisdiction.`,variables:["orgName"]},{id:"data-subject-rights",title:"Data Subject Rights",description:"Outlines the rights of data subjects under the NDPA.",order:5,required:true,included:true,template:`Under the NDPA 2023, you have the following rights regarding your personal data:
|
|
27
|
+
|
|
28
|
+
- Right of access: request a copy of the personal data we hold about you.
|
|
29
|
+
- Right to rectification: request correction of inaccurate or incomplete data.
|
|
30
|
+
- Right to erasure: request deletion of your personal data where there is no compelling reason for continued processing.
|
|
31
|
+
- Right to restrict processing: request limitation of how we process your data.
|
|
32
|
+
- Right to data portability: receive your data in a structured, commonly used format.
|
|
33
|
+
- Right to object: object to processing based on legitimate interest or for direct marketing purposes.
|
|
34
|
+
- Right to withdraw consent: withdraw previously given consent at any time without affecting prior processing.
|
|
35
|
+
|
|
36
|
+
To exercise any of these rights, contact us at {{privacyEmail}}. We will respond to your request within 30 days.`,variables:["privacyEmail"]},{id:"data-retention",title:"Data Retention",description:"Describes how long personal data is retained and the criteria for retention periods.",order:6,required:true,included:true,template:`{{orgName}} retains personal data only for as long as necessary to fulfil the purposes for which it was collected, or as required by applicable Nigerian law. Retention periods are determined based on:
|
|
37
|
+
|
|
38
|
+
- The nature of the data and the purposes for processing.
|
|
39
|
+
- Legal, regulatory, and contractual obligations.
|
|
40
|
+
- Legitimate business needs such as maintaining records for audits or dispute resolution.
|
|
41
|
+
|
|
42
|
+
When personal data is no longer needed, it will be securely deleted or anonymised in accordance with our data retention policy.`,variables:["orgName"]},{id:"data-security",title:"Data Security",description:"Describes the security measures in place to protect personal data.",order:7,required:true,included:true,template:`We implement appropriate technical and organisational measures to protect personal data against unauthorised access, alteration, disclosure, or destruction. These measures include:
|
|
43
|
+
|
|
44
|
+
- Encryption of data in transit and at rest.
|
|
45
|
+
- Access controls and authentication mechanisms.
|
|
46
|
+
- Regular security assessments and vulnerability testing.
|
|
47
|
+
- Staff training on data protection and information security.
|
|
48
|
+
- Incident response procedures in line with NDPA breach notification requirements.
|
|
49
|
+
|
|
50
|
+
While we strive to protect your data, no method of transmission or storage is completely secure. If you become aware of any security incident, please contact us immediately at {{privacyEmail}}.`,variables:["privacyEmail"]},{id:"contact-info",title:"Contact Information",description:"Provides contact details for privacy-related enquiries and the Data Protection Officer.",order:8,required:true,included:true,template:`If you have questions, concerns, or requests regarding this privacy policy or our data practices, please contact us:
|
|
51
|
+
|
|
52
|
+
Organisation: {{orgName}}
|
|
53
|
+
Address: {{address}}
|
|
54
|
+
Email: {{privacyEmail}}
|
|
55
|
+
Website: {{website}}
|
|
56
|
+
|
|
57
|
+
Data Protection Officer: {{dpoName}}
|
|
58
|
+
DPO Email: {{dpoEmail}}
|
|
59
|
+
|
|
60
|
+
You also have the right to lodge a complaint with the Nigeria Data Protection Commission (NDPC) if you believe your data protection rights have been violated.
|
|
61
|
+
|
|
62
|
+
This policy is effective as of {{effectiveDate}} and applies to all {{industry}} services provided by {{orgName}}.`,variables:["orgName","address","privacyEmail","website","dpoName","dpoEmail","effectiveDate","industry"]}],y=[{id:"orgName",name:"orgName",description:"The official name of your organisation.",value:"",inputType:"text",required:true},{id:"website",name:"website",description:"Your organisation's website URL.",value:"",inputType:"url",required:true},{id:"privacyEmail",name:"privacyEmail",description:"Email address for privacy-related enquiries.",value:"",inputType:"email",required:true},{id:"dpoName",name:"dpoName",description:"Full name of your Data Protection Officer.",value:"",inputType:"text",required:false},{id:"dpoEmail",name:"dpoEmail",description:"Email address of your Data Protection Officer.",value:"",inputType:"email",required:false},{id:"address",name:"address",description:"Physical address of your organisation.",value:"",inputType:"textarea",required:false},{id:"industry",name:"industry",description:"The industry or sector your organisation operates in.",value:"",inputType:"text",required:false},{id:"effectiveDate",name:"effectiveDate",description:"The date this privacy policy becomes effective.",value:"",inputType:"date",required:false}];function v(){return {sections:h.map(i=>chunkMQFZHA2D_js.a({},i)),variables:y.map(i=>chunkMQFZHA2D_js.a({},i))}}exports.a=f;exports.b=h;exports.c=y;exports.d=v;//# sourceMappingURL=chunk-5RSOLEEP.js.map
|
|
63
|
+
//# sourceMappingURL=chunk-5RSOLEEP.js.map
|