import{defineProperty as e}from"../../../../../../_virtual/_rollupPluginBabelHelpers.js";import r from"react";import t from"classnames";import a from"../../../../FieldLabel/FieldLabel.js";import o from"../../../../Text/Text.js";import s from"./DropdownBase.module.scss.js";import{getTestId as l}from"../../../../../tests/testIds.js";import{ComponentDefaultTestId as i,ComponentVibeId as d}from"../../../../../tests/constants.js";import{useDropdownContext as m}from"../../context/DropdownContext.js";import n from"../../../../Tooltip/Tooltip.js";var p=function(p){var c=p.dropdownRef,f=p.children,b=m(),u=b.label,j=b.required,v=b.getLabelProps,O=b.id,x=b.ariaLabel,T=b["data-testid"],D=b.readOnly,N=b.error,P=b.isFocused,g=b.isOpen,E=b.helperText,w=b.dir,y=b.tooltipProps,L=r.createElement("div",{ref:c,className:t(s.wrapper,b.className,e(e(e(e({},s.disabled,b.disabled),s.readOnly,D),s.error,N),s.active,P||g)),id:O,"aria-label":x,"data-testid":T||l(i.DROPDOWN,O),"data-vibe":d.DROPDOWN},f);return r.createElement("div",{dir:w,className:s.outerWrapper},u&&r.createElement(a,Object.assign({labelText:u,required:j},v())),r.createElement(n,Object.assign({},y,{content:null==y?void 0:y.content}),L),E&&r.createElement(o,{color:N?"negative":"secondary",className:s.helperText},E))};export{p as default};
//# sourceMappingURL=DropdownBase.js.map
