"use strict";var r=require('./../../ext-esm/tslib/tslib.es6.js'),e=require("react/jsx-runtime"),o=require("react"),n=require("@material-ui/core"),t=require("../ColorPicker/PaletteChromePicker/PaletteChromePicker.js"),a={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?a.rgb(r):a.rgba(r)},rgba_hex:function(r){return 1===r.rgb.a?a.hex(r):a.rgba(r)}},i=n.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(c){var l=c.color,g=c.onChange,p=c.anchorEl,s=void 0===p?null:p,b=c.handleClose,u=c.converter,h=void 0===u?"rgba_hex":u,x=c.popoverAnchorOrigin,d=void 0===x?{vertical:"bottom",horizontal:"left"}:x,f=c.popoverTransformOrigin,v=void 0===f?{vertical:"top",horizontal:"left"}:f,m=c.pickerComponent,C=void 0===m?t:m,P=c.enableTransparencyPalette,_=void 0!==P&&P,j=i(),z=o.useRef();return e.jsx("div",r.__assign({className:j.root},{children:e.jsx(n.Popover,r.__assign({id:"colors-popper",action:z,open:Boolean(s),anchorEl:s,onClose:b,anchorOrigin:d,transformOrigin:v},{children:e.jsx(C,{color:l,onChange:function(r){var e=a[h](r);g(e)},onSizeChange:function(){z.current&&z.current.updatePosition()},enableTransparencyPalette:_})}))}))};
