"use strict";(globalThis.webpackChunkcomplianz_gdpr=globalThis.webpackChunkcomplianz_gdpr||[]).push([[2058,6902],{42058:(e,n,i)=>{i.r(n),i.d(n,{default:()=>s});var r=i(27723),o=i(4219),a=i(86087),l=i(52043),d=i(45111),t=i(76902),c=i(10790);const s=(0,a.memo)((()=>{const{fieldsLoaded:e,fields:n,updateField:i,getFieldValue:s,changedFields:u,setChangedField:p,updateFieldsData:h,addHelpNotice:g,fetchAllFieldsCompleted:_,allRequiredFieldsCompleted:b,notCompletedRequiredFields:f}=(0,o.default)(),{getMenuLinkById:m}=(0,l.default)(),{cookiebannerRequired:k,getCookieBannerRequired:z}=(0,t.default)();return(0,a.useEffect)((()=>{e&&(u.length>0||z())}),[u]),(0,a.useEffect)((()=>{e&&_()}),[e,n]),(0,a.useEffect)((()=>{e&&s("cookie_banner_required")!==k&&(i("cookie_banner_required",k),p("cookie_banner_required",k),h())}),[e,k]),(0,a.useEffect)((()=>{if(e)if(k){let e=(0,r.__)("The consent banner and cookie blocker are required on your website.","complianz-gdpr")+" "+(0,r.__)("You can enable them both here, then you should check your website if your configuration is working properly.","complianz-gdpr")+" "+(0,r.__)("Please read the below article to debug any issues while in safe mode. Safe mode is available under settings.","complianz-gdpr")+" "+(0,r.__)("You will find tips and tricks on your dashboard after you have configured your consent banner.","complianz-gdpr");g("last-step-feedback","default",e,(0,r.__)("A consent banner is required","complianz-gdpr"),"https://complianz.io/debugging-manual")}else{let e=(0,r.__)("Your site does not require a consent banner. If you think you need a consent banner, please review your wizard settings.","complianz-gdpr");g("last-step-feedback","warning",e,(0,r.__)("A consent banner is not required","complianz-gdpr"))}}),[e,k,u]),(0,c.jsxs)(c.Fragment,{children:[f.length<2&&(0,c.jsx)("b",{children:(0,r.__)("Almost there!","complianz-gdpr")}),f.length>=2&&(0,c.jsx)("b",{children:(0,r.__)("There are %s questions that are required to complete the wizard.","complianz-gdpr").replace("%s",f.length)}),b&&(0,c.jsxs)("div",{children:[(0,c.jsx)("p",{children:(0,r.__)("Click '%s' to complete the configuration. You can come back to change your configuration at any time.","complianz-gdpr").replace("%s",(0,r.__)("Finish","complianz-gdpr"))}),k&&(0,c.jsx)("p",{children:(0,r.__)("The consent banner and the cookie blocker are now ready to be enabled.","complianz-gdpr")+" "+(0,r.__)("Please check your website after finishing the wizard to verify that your configuration is working properly.","complianz-gdpr")})]}),!b&&(0,c.jsxs)("div",{children:[(0,c.jsx)("p",{children:(0,r.__)("Not all required fields are completed yet.","complianz-gdpr")+" "+(0,r.__)("Please check the wizard to complete all required questions.","complianz-gdpr")}),(0,c.jsx)("p",{children:(0,r.__)("The following required fields have not been completed:","complianz-gdpr")}),(0,c.jsx)("ul",{children:f.map(((e,n)=>(0,c.jsx)("li",{children:(0,c.jsxs)("div",{children:[e.parent_label?e.parent_label:e.label," ",(0,c.jsx)("a",{href:m(e.menu_id),children:(0,c.jsx)(d.default,{name:"circle-chevron-right",color:"black",tooltip:(0,r.__)("Go to question","complianz-gdpr"),size:14})})]})},n)))})]})]})}))},76902:(e,n,i)=>{i.r(n),i.d(n,{default:()=>a});var r=i(81621),o=i(9588);const a=(0,r.vt)(((e,n)=>({cookiebannerRequired:!1,loading:!1,getCookieBannerRequired:async()=>{if(n().loading)return;e({loading:!0});const{required:i}=await o.doAction("get_cookiebanner_required",{}).then((e=>e));e({cookiebannerRequired:i,loading:!1})}})))}}]);