"use strict";(globalThis.webpackChunkcomplianz_gdpr=globalThis.webpackChunkcomplianz_gdpr||[]).push([[9684,9166],{9684:(e,t,a)=>{a.r(t),a.d(t,{default:()=>_});var s=a(51609),c=a(27723),l=a(45111),n=a(47143),i=a(9588),r=a(99166),m=a(4219),o=a(32828),d=a(52043),p=a(42838),u=a.n(p);const _=({notice:e,index:t})=>{const{dismissNotice:a,fetchProgressData:p}=(0,o.default)(),{getField:_,setHighLightField:h,fetchFieldsData:g}=(0,m.default)(),{setSelectedSubMenuItem:b}=(0,d.default)();let z="premium"===e.icon,f=e.url&&-1!==e.url.indexOf("complianz.io"),k=e.status.charAt(0).toUpperCase()+e.status.slice(1);return(0,s.createElement)("div",{key:t,className:"cmplz-task-element"},(0,s.createElement)("span",{className:"cmplz-task-status cmplz-"+e.status},k),(0,s.createElement)("p",{className:"cmplz-task-message",dangerouslySetInnerHTML:{__html:u().sanitize(e.message)}}),f&&e.url&&(0,s.createElement)("a",{target:"_blank",href:e.url,rel:"noopener noreferrer"},(0,c.__)("More info","complianz-gdpr")),e.clear_cache_id&&(0,s.createElement)("span",{className:"cmplz-task-enable button button-secondary",onClick:()=>(async e=>{let t={};t.cache_id=e,i.doAction("clear_cache",t).then((async e=>{(0,n.dispatch)("core/notices").createNotice("success",(0,c.__)("Re-started test","complianz-gdpr"),{__unstableHTML:!0,id:"cmplz_clear_cache",type:"snackbar",isDismissible:!0}).then((0,r.default)(3e3)).then((e=>{(0,n.dispatch)("core/notices").removeNotice("rsssl_clear_cache")})),await g(),await p()}))})(e.clear_cache_id)},(0,c.__)("Re-check","complianz-gdpr")),!z&&!f&&e.url&&(0,s.createElement)("a",{className:"cmplz-task-enable button button-secondary",href:e.url},(0,c.__)("View","complianz-gdpr")),!z&&e.highlight_field_id&&(0,s.createElement)("span",{className:"cmplz-task-enable button button-secondary",onClick:()=>(async()=>{h(e.highlight_field_id);let t=_(e.highlight_field_id);await b(t.menu_id)})()},(0,c.__)("View","complianz-gdpr")),e.plus_one&&(0,s.createElement)("span",{className:"cmplz-plusone"},"1"),e.dismissible&&"completed"!==e.status&&(0,s.createElement)("div",{className:"cmplz-task-dismiss"},(0,s.createElement)("button",{type:"button",onClick:t=>a(e.id)},(0,s.createElement)(l.default,{name:"times"}))))}},99166:(e,t,a)=>{a.r(t),a.d(t,{default:()=>s});const s=e=>function(t){return new Promise((a=>setTimeout((()=>a(t)),e)))}}}]);