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