import o from"classnames";import r,{forwardRef as e,useRef as t,useCallback as i}from"react";import{BaseSizes as s}from"../../constants/sizes.js";import l from"../../hooks/useMergeRef.js";import{ColorStyle as c}from"../../utils/colors-vars-map.js";import n from"./components/ColorPickerContent/ColorPickerContent.js";import{ColorShapes as a,DEFAULT_NUMBER_OF_COLORS_IN_LINE as m}from"./ColorPickerConstants.js";import{calculateColorPickerDialogWidth as d}from"./services/ColorPickerStyleService.js";import{withStaticProps as C}from"../../types/withStaticProps.js";import{NOOP as u}from"../../utils/function-utils.js";import{getTestId as f,ComponentDefaultTestId as p}from"../../tests/testIds.js";import v from"./ColorPicker.module.scss.js";import{ComponentVibeId as I}from"../../tests/constants.js";import S from"../../../components/dialog/dist/DialogContentContainer/DialogContentContainer.js";import k from"../../../icons/dist/react/NoColor.js";var h=C(e((function(e,s){var c=e.className,a=e.onSave,C=void 0===a?u:a,h=e.value,j=void 0===h?"":h,P=e.noColorText,L=e.colorStyle,g=void 0===L?"regular":L,R=e.ColorIndicatorIcon,y=e.SelectedIndicatorIcon,O=e.shouldRenderIndicatorWithoutBackground,b=e.NoColorIcon,M=void 0===b?k:b,N=e.isBlackListMode,w=void 0===N||N,z=e.colorsList,D=void 0===z?[]:z,B=e.isMultiselect,E=e.colorSize,T=void 0===E?"medium":E,x=e.numberOfColorsInLine,K=void 0===x?m:x,U=e.focusOnMount,W=e.colorShape,_=void 0===W?"square":W,q=e.forceUseRawColorList,V=e.showColorNameTooltip,A=e.id,F=e["data-testid"],G=t(null),H=l(s,G),J=i(C,[C]),Q=d(T,K);return r.createElement(S,{ref:H,className:o(v.colorPicker,v.colorPickerDialogContent,c),ariaLabelledby:"Color Picker Dialog",ariaDescribedby:"Pick color",style:{width:Q},"data-vibe":I.COLOR_PICKER},r.createElement(n,{onValueChange:J,value:j,noColorText:P,shouldRenderIndicatorWithoutBackground:R&&O,colorStyle:g,ColorIndicatorIcon:R,SelectedIndicatorIcon:y,NoColorIcon:M,colorsList:D,isBlackListMode:w,isMultiselect:B,colorSize:T,numberOfColorsInLine:K,focusOnMount:U,colorShape:_,forceUseRawColorList:q,showColorNameTooltip:V,id:A,"data-testid":F||f(p.COLOR_PICKER,A)}))})),{sizes:s,colorStyles:c,colorSizes:s,colorShapes:a});export{h as default};
//# sourceMappingURL=ColorPicker.js.map
