"use strict";var r=require("react/jsx-runtime"),e=require("react"),o=require("@material-ui/core"),n=require("../ColorPicker/PaletteChromePicker/PaletteChromePicker.js"),t={rgba:function(r){return"rgba(".concat(r.rgb.r,", ").concat(r.rgb.g,", ").concat(r.rgb.b,", ").concat(r.rgb.a,")")},rgb:function(r){return"rgb(".concat(r.rgb.r,", ").concat(r.rgb.g,", ").concat(r.rgb.b,")")},hex:function(r){return r.hex},rgba_rgb:function(r){return 1===r.rgb.a?t.rgb(r):t.rgba(r)},rgba_hex:function(r){return 1===r.rgb.a?t.hex(r):t.rgba(r)}},a=o.makeStyles({root:{position:"relative",display:"flex"},popper:{zIndex:1500},topLabel:{marginBottom:"8px",fontSize:"15px",lineHeight:"17px",letterSpacing:"0.4px",color:"#BDBDBD",whiteSpace:"nowrap"},rightLabel:{marginLeft:"8px",fontSize:"16px"}});module.exports=function(i){var c=i.color,l=i.onChange,g=i.anchorEl,p=void 0===g?null:g,u=i.handleClose,b=i.converter,h=void 0===b?"rgba_hex":b,s=i.popoverAnchorOrigin,x=void 0===s?{vertical:"bottom",horizontal:"left"}:s,f=i.popoverTransformOrigin,v=void 0===f?{vertical:"top",horizontal:"left"}:f,d=i.pickerComponent,m=void 0===d?n:d,C=i.enableTransparencyPalette,P=void 0!==C&&C,z=a(),S=e.useRef(null);return r.jsx("div",{className:z.root,children:r.jsx(o.Popover,{id:"colors-popper",action:S,open:Boolean(p),anchorEl:p,onClose:u,anchorOrigin:x,transformOrigin:v,children:r.jsx(m,{color:c,onChange:function(r){var e=t[h](r);l(e)},onSizeChange:function(){S.current&&S.current.updatePosition()},enableTransparencyPalette:P})})})};
//# sourceMappingURL=ColorPickerPalette.js.map
