"use strict";(self.webpackChunkcomplianz_gdpr=self.webpackChunkcomplianz_gdpr||[]).push([[5848],{5848:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(51609),a=n(86087),r=n(27723);const s=(0,a.memo)((function({field:e,label:t}){const[n,s]=(0,a.useState)(!1),c=()=>{if(n)return;s(!0);let t=new XMLHttpRequest;t.responseType="blob",t.open("get",e.url,!0),t.send(),t.onreadystatechange=function(){if(4===this.readyState&&200===this.status){var e=window.URL.createObjectURL(this.response),t=window.document.createElement("a");t.setAttribute("href",e),t.setAttribute("download","complianz-export.json"),window.document.body.appendChild(t),t.click(),setTimeout((function(){window.URL.revokeObjectURL(e)}),6e4)}},t.onprogress=function(e){s(!0)}};return(0,o.createElement)("div",{className:"cmplz-export-container"},(0,o.createElement)("button",{className:"button button-default",onClick:()=>c()},(0,r.__)("Export","complianz-gdpr")))}))}}]);