"use strict";(globalThis.webpackChunkcomplianz_gdpr=globalThis.webpackChunkcomplianz_gdpr||[]).push([[5228],{25228:(e,l,a)=>{a.r(l),a.d(l,{default:()=>s});var t=a(51609),r=a(86087),c=a(45296),n=a(45111),m=a(27723);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.bL,{value:e,defaultValue:r,onValueChange:l,required:a,disabled:s&&!Array.isArray(s)},(0,t.createElement)(c.l9,{className:"cmplz-select-group__trigger"},(0,t.createElement)(c.WT,null),(0,t.createElement)(n.default,{name:"chevron-down"})),(0,t.createElement)(c.UC,{className:"cmplz-select-group__content",position:"popper"},(0,t.createElement)(c.PP,{className:"cmplz-select-group__scroll-button"},(0,t.createElement)(n.default,{name:"chevron-up"})),(0,t.createElement)(c.LM,{className:"cmplz-select-group__viewport"},(0,t.createElement)(c.YJ,null,Object.entries(p).map((([e,l])=>(0,t.createElement)(c.q7,{disabled:Array.isArray(s)&&s.includes(e),className:"cmplz-select-group__item",key:e,value:e},(0,t.createElement)(c.p4,null,l)))))),(0,t.createElement)(c.wn,{className:"cmplz-select-group__scroll-button"},(0,t.createElement)(n.default,{name:"chevron-down"})))))}))}}]);