"use strict";(globalThis.webpackChunkcomplianz_gdpr=globalThis.webpackChunkcomplianz_gdpr||[]).push([[2708,3644],{32708:(t,e,a)=>{a.r(e),a.d(e,{default:()=>p});var n=a(51280),s=a(53644),i=a(88496),l=a(15832),o=a(93396),r=a(87287),c=a(25536);const p=(0,i.memo)((()=>{const{progress:t,active:e,start:a,next:p,total:m,copySites:u}=(0,s.default)(),[g,d]=(0,i.useState)(!1),{addHelpNotice:y,removeHelpNotice:f}=(0,c.default)();return(0,i.useEffect)((()=>{t<100?e&&((async()=>{await u(!1)})(),y("copy-multisite","warning",(0,o.__)("Complianz is currently copying settings of site %1$s to %2$s of %3$s sites.","complianz-gdpr").replace("%1$s",a).replace("%2$s",p).replace("%3$s",m),(0,o.__)("Copying settings...","complianz-gdpr"),!1)):f("copy-multisite")}),[t]),(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:"cmplz-export-container"},(0,n.createElement)(r.__experimentalConfirmDialog,{isOpen:g,onConfirm:async()=>{d(!1),await u(!0)},onCancel:()=>{d(!1)}},(0,o.__)("Are you sure? This will overwrite the settings in all your subsites with the Complianz settings of this site.","complianz-gdpr")),(0,n.createElement)("button",{className:"button button-default",onClick:()=>d(!0)},(0,o.__)("Start","complianz-gdpr"),e&&(0,n.createElement)(n.Fragment,null," ",t,"%",(0,n.createElement)(l.default,{name:"loading",color:"grey"})))))}))},53644:(t,e,a)=>{a.r(e),a.d(e,{default:()=>i});var n=a(30809),s=a(61744);const i=(0,n.Su)(((t,e)=>({progress:0,total:0,start:0,next:0,active:!1,copySites:async e=>{let a={restart:e};t({active:!0});const{start:n,next:i,total:l}=await s.doAction("copy_multisite",a).then((t=>t));let o=Math.round(i/l*100);t({progress:o,start:n,next:i,total:l}),o>=100&&t({active:!1})}})))}}]);