1import{b as f,j as e}from"./app-DlfbqdF2.js";import{R as j,C as s}from"./tokens-D9CTjdA_.js";import{u as A,a as y,A as S}from"./useModuleAccess-DewUhYGT.js";import{u as m}from"./useTranslate-1hT__Qbq.js";import{B as p}from"./Button-DBA1PDN9.js";import"./preload-helper-I4rgV-VL.js";import"./merge-WwJn_B7a.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./form.module-DRFqX35K.js";function W({dpia:a,lia:n,activityId:o,started:i}){const t=m(),{userHasWriteRole:x}=f().props,u=A("assessments"),h=y("assessments"),g=x&&h>S,d=t("ropa.assessment_start","Start"),c=[{code:t("ropa.lia","LIA"),name:t("ropa.lia_full","Legitimate Interest Assessment"),status:n,startUrl:`/activity/lia_assessment/${o}`,actionLabel:i?.lia?t("assessment.edit_lia","Edit LIA"):d,started:i?.lia===!0},{code:t("ropa.dpia","DPIA"),name:t("ropa.dpia_full","Data Protection Impact Assessment"),status:a,startUrl:`/activity/dpia_assessment/${o}`,actionLabel:i?.dpia?t("assessment.edit_dpia","Edit DPIA"):d,started:i?.dpia===!0}],l={textAlign:"left",padding:"7px 12px",fontSize:10.5,fontWeight:700,color:s.muted,textTransform:"uppercase",letterSpacing:".4px",borderBottom:`1px solid ${s.borderLight}`};return e.jsxs("div",{style:{border:`1px solid ${s.border}`,borderRadius:j.card,overflow:"hidden"},children:[e.jsx("div",{style:{padding:"7px 12px",background:s.surface,borderBottom:`1px solid ${s.border}`,fontSize:11,fontWeight:700,color:s.muted,textTransform:"uppercase",letterSpacing:".5px"},children:t("ropa.assessments_table_heading","Assessments â LIA & DPIA")}),e.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{style:l,children:t("ropa.assessment_col","Assessment")}),e.jsx("th",{style:l,children:t("assets.status","Status")}),e.jsx("th",{style:l,"aria-hidden":"true"})]})}),e.jsx("tbody",{children:c.map((r,b)=>e.jsxs("tr",{style:{borderBottom:b<c.length-1?`1px solid ${s.borderLight}`:"none",verticalAlign:"middle"},children:[e.jsxs("td",{style:{padding:"10px 12px"},children:[e.jsx("div",{style:{fontSize:13,fontWeight:700,color:s.heading},children:r.code}),e.jsx("div",{style:{fontSize:11.5,color:s.muted},children:r.name})]}),e.jsx("td",{style:{padding:"10px 12px",maxWidth:320},children:e.jsx(_,{status:r.status})}),e.jsx("td",{style:{padding:"10px 12px",textAlign:"right",whiteSpace:"nowrap"},children:o===null?e.jsx("span",{style:{fontSize:11.5,color:s.subtle},children:t("ropa.assessment_after_save","Available once saved")}):u?e.jsx(p,{href:r.startUrl,variant:"primary",size:"sm",inertia:!0,children:r.actionLabel}):g&&r.started?e.jsx(p,{href:r.startUrl,variant:"secondary",size:"sm",inertia:!0,children:t("general.view_details","View details")}):null})]},r.code))})]})]})}function _({status:a}){const n=m();if(!a)return e.jsx("span",{style:{fontSize:12,color:s.subtle},children:n("ropa.assessment_not_required","Not required for this record")});const o=a.state==="completed"?{label:n("ropa.assessment_completed","Completed"),color:s.successText,bg:s.successBg}:a.state==="recommended"?{label:n("ropa.assessment_recommended","Recommended"),color:s.warnText,bg:s.warnBg}
1:{label:n("ropa.assessment_required","Required"),color:s.dangerText,bg:s.dangerBg};return e.jsxs("div",{children:[e.jsx("span",{style:{fontSize:11,fontWeight:700,color:o.color,background:o.bg,padding:"2px 8px",borderRadius:10,whiteSpace:"nowrap"},children:o.label}),a.tooltip?e.jsx("div",{style:{fontSize:11.5,color:s.muted,marginTop:3,whiteSpace:"normal"},children:a.tooltip}):null]})}export{W as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.