import r from"prop-types";import{CustomPicker as e}from"react-color";import o from"classnames";import a from"chroma-js";import t from"../ColorSquare/ColorSquare.js";import{paletteColorsWithTransparent as n,paletteColors as s}from"./PaletteConstants.js";import l from"./Palette.css.js";import{jsx as i}from"react/jsx-runtime";var m=function(r,e){var o=a(r).alpha(),t=a(e).alpha();return o?r===e:o===t},c=function(r){var e=r.onChange,a=r.color,c=r.className,p=r.enableTransparencyPalette?n:s;return i("div",{className:o(l.paletteContainer,c),children:p.map((function(r){return i(t,{color:r,isSelected:m(a,r),onClick:function(){e(r)}},r)}))})};c.propTypes={onChange:r.func.isRequired,color:r.string.isRequired,className:r.string,enableTransparencyPalette:r.bool.isRequired},c.defaultProps={className:null};var p=e(c);export{p as default};
