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