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