"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:()=>c});var a=l(86087),n=l(27723),o=l(4219),r=l(56716),s=l(25228);const c=e=>{const{getFieldValue:t,fieldsLoaded:l}=(0,o.default)(),{getRegion:c,setRegion:i,region:p}=(0,r.default)();if((0,a.useEffect)((()=>{c()}),[]),!l)return null;let m=t("regions");Array.isArray(m)||(m=[m]),0===m.length&&(m=["eu"]),m||(m=[]);let u=[];for(const e of m){if(!cmplz_settings.regions.hasOwnProperty(e))continue;let t={};t.label=cmplz_settings.regions[e].label_full,t.value=e,u.push(t)}let d={};return d.label=(0,n.__)("General","complianz-gdpr"),d.value="all",u.push(d),(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h3",{className:"cmplz-grid-title cmplz-h4"},(0,n.__)("Documents","complianz-gdpr")),(0,a.createElement)("div",{className:"cmplz-grid-item-controls"},(0,a.createElement)(s.default,{defaultValue:"all",canBeEmpty:!1,onChange:e=>i(e),value:p,options:u})))}},25228:(e,t,l)=>{l.r(t),l.d(t,{default:()=>s});var a=l(86087),n=l(45296),o=l(45111),r=l(27723);const s=(0,a.memo)((({value:e=!1,onChange:t,required:l,defaultValue:s,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,r.__)("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)(n.bL,{value:e,defaultValue:s,onValueChange:t,required:l,disabled:c&&!Array.isArray(c)},(0,a.createElement)(n.l9,{className:"cmplz-select-group__trigger"},(0,a.createElement)(n.WT,null),(0,a.createElement)(o.default,{name:"chevron-down"})),(0,a.createElement)(n.UC,{className:"cmplz-select-group__content",position:"popper"},(0,a.createElement)(n.PP,{className:"cmplz-select-group__scroll-button"},(0,a.createElement)(o.default,{name:"chevron-up"})),(0,a.createElement)(n.LM,{className:"cmplz-select-group__viewport"},(0,a.createElement)(n.YJ,null,Object.entries(i).map((([e,t])=>(0,a.createElement)(n.q7,{disabled:Array.isArray(c)&&c.includes(e),className:"cmplz-select-group__item",key:e,value:e},(0,a.createElement)(n.p4,null,t)))))),(0,a.createElement)(n.wn,{className:"cmplz-select-group__scroll-button"},(0,a.createElement)(o.default,{name:"chevron-down"})))))}))}}]);