"use strict";(globalThis.webpackChunkcomplianz_gdpr=globalThis.webpackChunkcomplianz_gdpr||[]).push([[1249,6716,5228],{56716:(e,t,l)=>{l.r(t),l.d(t,{default:()=>o});var a=l(81621),n=l(9588);const o=(0,a.vt)(((e,t)=>({documents:[],documentDataLoaded:!1,processingAgreementOptions:[],proofOfConsentOptions:[],dataBreachOptions:[],region:"",setRegion:t=>{"undefined"!=typeof Storage&&(sessionStorage.cmplzSelectedRegion=t),e((e=>({region:t})))},getRegion:()=>{let t="all";"undefined"!=typeof Storage&&sessionStorage.cmplzSelectedRegion&&(t=sessionStorage.cmplzSelectedRegion),e((e=>({region:t})))},getDocuments:async()=>{const{documents:t,processingAgreementOptions:l,proofOfConsentOptions:a,dataBreachOptions:o}=await n.doAction("documents_block_data").then((e=>e));e((e=>({documentDataLoaded:!0,documents:t,processingAgreementOptions:l,proofOfConsentOptions:a,dataBreachOptions:o})))}})))},61249:(e,t,l)=>{l.r(t),l.d(t,{default:()=>i});var a=l(51609),n=l(86087),o=l(27723),r=l(4219),s=l(56716),c=l(25228);const i=e=>{const{getFieldValue:t,fieldsLoaded:l}=(0,r.default)(),{getRegion:i,setRegion:p,region:m}=(0,s.default)();if((0,n.useEffect)((()=>{i()}),[]),!l)return null;let u=t("regions");Array.isArray(u)||(u=[u]),0===u.length&&(u=["eu"]),u||(u=[]);let d=[];for(const e of u){if(!cmplz_settings.regions.hasOwnProperty(e))continue;let t={};t.label=cmplz_settings.regions[e].label_full,t.value=e,d.push(t)}let g={};return g.label=(0,o.__)("General","complianz-gdpr"),g.value="all",d.push(g),(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h3",{className:"cmplz-grid-title cmplz-h4"},(0,o.__)("Documents","complianz-gdpr")),(0,a.createElement)("div",{className:"cmplz-grid-item-controls"},(0,a.createElement)(c.default,{defaultValue:"all",canBeEmpty:!1,onChange:e=>p(e),value:m,options:d})))}},25228:(e,t,l)=>{l.r(t),l.d(t,{default:()=>c});var a=l(51609),n=l(86087),o=l(45296),r=l(45111),s=l(27723);const c=(0,n.memo)((({value:e=!1,onChange:t,required:l,defaultValue:n,disabled:c,options:i={},canBeEmpty:p=!0,label:m})=>{if(Array.isArray(i)){let e={};i.map((t=>{e[t.value]=t.label})),i=e}return p?(""===e||!1===e||0===e)&&(e="0",i={0:(0,s.__)("Select an option","complianz-gdpr"),...i}):e||(e=Object.keys(i)[0]),(0,a.createElement)("div",{className:"cmplz-input-group cmplz-select-group",key:m},(0,a.createElement)(o.bL,{value:e,defaultValue:n,onValueChange:t,required:l,disabled:c&&!Array.isArray(c)},(0,a.createElement)(o.l9,{className:"cmplz-select-group__trigger"},(0,a.createElement)(o.WT,null),(0,a.createElement)(r.default,{name:"chevron-down"})),(0,a.createElement)(o.UC,{className:"cmplz-select-group__content",position:"popper"},(0,a.createElement)(o.PP,{className:"cmplz-select-group__scroll-button"},(0,a.createElement)(r.default,{name:"chevron-up"})),(0,a.createElement)(o.LM,{className:"cmplz-select-group__viewport"},(0,a.createElement)(o.YJ,null,Object.entries(i).map((([e,t])=>(0,a.createElement)(o.q7,{disabled:Array.isArray(c)&&c.includes(e),className:"cmplz-select-group__item",key:e,value:e},(0,a.createElement)(o.p4,null,t)))))),(0,a.createElement)(o.wn,{className:"cmplz-select-group__scroll-button"},(0,a.createElement)(r.default,{name:"chevron-down"})))))}))}}]);