import{defineProperty as e}from"../../../../../../_virtual/_rollupPluginBabelHelpers.js";import r from"react";import t from"classnames";import o from"../../../../FieldLabel/FieldLabel.js";import a 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,b=p.children,f=m(),u=f.label,j=f.required,x=f.getLabelProps,v=f.className,O=f.id,T=f.ariaLabel,D=f["data-testid"],N=f.readOnly,P=f.error,g=f.isFocused,E=f.isOpen,w=f.helperText,y=f.dir,L=f.tooltipProps,h=f.boxMode,F=f.borderless,R=r.createElement("div",{ref:c,className:t(s.wrapper,e(e(e(e(e(e({},s.disabled,f.disabled),s.readOnly,N),s.error,P),s.active,g||E),s.boxMode,h),s.borderless,F),v),id:O,"aria-label":T,"data-testid":D||l(i.DROPDOWN,O),"data-vibe":d.DROPDOWN},b);return r.createElement("div",{dir:y,className:s.outerWrapper},u&&r.createElement(o,Object.assign({labelText:u,required:j},x())),r.createElement(n,Object.assign({},L,{content:null==L?void 0:L.content}),R),w&&r.createElement(a,{color:P?"negative":"secondary",className:s.helperText},w))};export{p as default};
//# sourceMappingURL=DropdownBase.js.map
