"use strict";(globalThis.webpackChunkcomplianz_gdpr=globalThis.webpackChunkcomplianz_gdpr||[]).push([[4056],{14056:(e,l,a)=>{a.r(l),a.d(l,{default:()=>s});var t=a(51280),r=a(88496),c=a(39992),n=a(15832),m=a(93396);const s=(0,r.memo)((({value:e=!1,onChange:l,required:a,defaultValue:r,disabled:s,options:p={},canBeEmpty:u=!0,label:o})=>{if(Array.isArray(p)){let e={};p.map((l=>{e[l.value]=l.label})),p=e}return u?(""===e||!1===e||0===e)&&(e="0",p={0:(0,m.__)("Select an option","complianz-gdpr"),...p}):e||(e=Object.keys(p)[0]),(0,t.createElement)("div",{className:"cmplz-input-group cmplz-select-group",key:o},(0,t.createElement)(c.Ss,{value:e,defaultValue:r,onValueChange:l,required:a,disabled:s&&!Array.isArray(s)},(0,t.createElement)(c.mf,{className:"cmplz-select-group__trigger"},(0,t.createElement)(c.s3,null),(0,t.createElement)(n.default,{name:"chevron-down"})),(0,t.createElement)(c.kP,{className:"cmplz-select-group__content",position:"popper"},(0,t.createElement)(c.O4,{className:"cmplz-select-group__scroll-button"},(0,t.createElement)(n.default,{name:"chevron-up"})),(0,t.createElement)(c.mm,{className:"cmplz-select-group__viewport"},(0,t.createElement)(c.WM,null,Object.entries(p).map((([e,l])=>(0,t.createElement)(c.iY,{disabled:Array.isArray(s)&&s.includes(e),className:"cmplz-select-group__item",key:e,value:e},(0,t.createElement)(c.CC,null,l)))))),(0,t.createElement)(c.y8,{className:"cmplz-select-group__scroll-button"},(0,t.createElement)(n.default,{name:"chevron-down"})))))}))}}]);