import o from"classnames";import"prop-types";import r,{forwardRef as e,useRef as t,useCallback as l}from"react";import{SIZES as s}from"../../constants/sizes.js";import c from"../../hooks/useMergeRefs.js";import i from"../DialogContentContainer/DialogContentContainer.js";import{COLOR_STYLES as n}from"../../utils/colors-vars-map.js";import a from"../Icon/Icons/components/NoColor.js";import m from"./components/ColorPickerContent/ColorPickerContentComponent.js";import{COLOR_SHAPES as C,DEFAULT_NUMBER_OF_COLORS_IN_LINE as d}from"./ColorPickerConstants.js";import{calculateColorPickerDialogWidth as p}from"./services/ColorPickerStyleService.js";import"./ColorPicker.scss.js";var u=e((function(e,s){var n=e.className,a=e.onSave,C=e.value,d=e.noColorText,u=e.colorStyle,f=e.ColorIndicatorIcon,I=e.SelectedIndicatorIcon,S=e.shouldRenderIndicatorWithoutBackground,h=e.NoColorIcon,k=e.isBlackListMode,L=e.colorsList,v=e.isMultiselect,M=e.colorSize,R=e.numberOfColorsInLine,N=e.focusOnMount,g=e.colorShape,j=e.forceUseRawColorList,y=e.showColorNameTooltip,w=t(null),O=c({refs:[s,w]}),P=l(a,[a]),b=p(M,R);return r.createElement(i,{ref:O,className:o("color-picker--wrapper","color-picker-dialog-content",n),ariaLabelledby:"Color Picker Dialog",ariaDescribedby:"Pick color",style:{width:b}},r.createElement(m,{onValueChange:P,value:C,noColorText:d,shouldRenderIndicatorWithoutBackground:f&&S,colorStyle:u,ColorIndicatorIcon:f,SelectedIndicatorIcon:I,NoColorIcon:h,colorsList:L,isBlackListMode:k,isMultiselect:v,colorSize:M,numberOfColorsInLine:R,focusOnMount:N,colorShape:g,forceUseRawColorList:j,showColorNameTooltip:y}))}));u.COLOR_STYLES=n,u.sizes=s,u.colorStyles=n,u.colorSizes=s,u.colorShapes=C,u.defaultProps={className:"",onSave:function(){},ColorIndicatorIcon:void 0,SelectedIndicatorIcon:void 0,value:"",colorStyle:n.REGULAR,noColorText:void 0,shouldRenderIndicatorWithoutBackground:!1,NoColorIcon:a,isBlackListMode:!0,colorsList:[],isMultiselect:!1,colorSize:u.sizes.MEDIUM,numberOfColorsInLine:d,focusOnMount:!1,colorShape:u.colorShapes.SQUARE,forceUseRawColorList:!1,showColorNameTooltip:!1};var f=u;export{f as default};
