"use strict";var e=require("prop-types"),r=require("react-color"),a=require("classnames"),t=require("chroma-js"),l=require("../ColorSquare/ColorSquare.js"),s=require("./PaletteConstants.js"),n=require("./Palette.css.js"),u=require("react/jsx-runtime");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=o(e),c=o(a),p=o(t),d=function(e,r){var a=p.default(e).alpha(),t=p.default(r).alpha();return a?e===r:a===t},f=function(e){var r=e.onChange,a=e.color,t=e.className,o=e.enableTransparencyPalette?s.paletteColorsWithTransparent:s.paletteColors;return u.jsx("div",{className:c.default(n.paletteContainer,t),children:o.map((function(e){return u.jsx(l,{color:e,isSelected:d(a,e),onClick:function(){r(e)}},e)}))})};f.propTypes={onChange:i.default.func.isRequired,color:i.default.string.isRequired,className:i.default.string,enableTransparencyPalette:i.default.bool.isRequired},f.defaultProps={className:null};var q=r.CustomPicker(f);module.exports=q;
