"use strict";var e=require("react/jsx-runtime"),o=require("react"),s=require("react-color"),i=require("classnames"),c=require("@material-ui/core"),n=require("./Palette/Palette.js"),r=require("../../IconButton/index.js"),t=require("../../../icons/iconParkIcons.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("../../../icons/customIcons/icons/AddMessage.js"),require("../../../icons/customIcons/icons/Attention.js"),require("../../../icons/customIcons/icons/Collapse.js"),require("../../../icons/customIcons/icons/Dashboard.js"),require("../../../icons/customIcons/icons/Expand.js"),require("../../../icons/customIcons/icons/FolderClosed.js"),require("../../../icons/customIcons/icons/FolderClosedFilled.js"),require("../../../icons/customIcons/icons/FolderOpened.js"),require("../../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../../icons/customIcons/icons/LessOrEqual.js"),require("../../../icons/customIcons/icons/Search.js"),require("../../../icons/customIcons/icons/Wellhub.js"),require("../../../icons/customIcons/icons/MultiRuler.js"),require("../../../icons/customIcons/icons/Checkbox.js"),require("../../../icons/customIcons/icons/CheckboxChecked.js"),require("../../../icons/customIcons/icons/CheckboxIndeterminate.js"),require("../../../icons/customIcons/icons/Radio.js"),require("../../../icons/customIcons/icons/RadioChecked.js"),require("../../../icons/customIcons/icons/SimulFrac.js"),require("../../../icons/customIcons/icons/ZipperFrac.js"),require("../../../icons/customIcons/icons/CautionFilled.js"),require("../../../icons/customIcons/icons/MoreApp.js");var u=a(i),l="PALETTE",d="CHROME_PICKER",p={default:{picker:{width:"100%",boxShadow:"none"},body:{backgroundColor:"#3b3b3b",padding:"16px 16px 0"},color:{width:"32px",height:"32px",marginRight:"16px",borderRadius:"2px"},swatch:{marginTop:0,width:"100%",height:"100%",borderRadius:0,position:"relative",overflow:"hidden"},toggles:{display:"flex",flexDirection:"column",justifyContent:"space-between"},Alpha:{checkboard:{display:"none"},gradient:{borderRadius:"5px"}}}},m=c.makeStyles({container:{backgroundColor:"#3b3b3b",boxShadow:"0px 3px 10px rgba(0, 0, 0, 0.4)",width:"250px",paddingBottom:"8px",borderRadius:"4px","& input":{border:"1px solid #616161 !important",backgroundColor:"#3b3b3b",color:"#fff !important",boxShadow:"none !important",outline:"none"}},chromePickerPalette:{margin:"0 8px",paddingTop:"8px"},buttonsContainer:{display:"flex",justifyContent:"center",marginTop:"8px"},iconActive:{color:"#fff"},tooltip:{background:"#414141",color:"#fff",boxShadow:"0px 4px 4px rgba(0, 0, 0, 0.12)",borderRadius:"4px",opacity:1,fontSize:"11px"}}),x=o.forwardRef((function(i,a){var x,h,j=i.color,b=i.onChange,q=i.onSizeChange,f=i.enableTransparencyPalette,I=m(),C=o.useState(l),g=C[0],k=C[1];return o.useLayoutEffect(q,[g]),e.jsxs("div",{className:I.container,ref:a,children:[g===l&&e.jsx(n,{className:I.chromePickerPalette,color:j,onChange:b,enableTransparencyPalette:f}),g===d&&e.jsx(s.ChromePicker,{styles:p,color:j,onChange:b}),e.jsxs("div",{className:I.buttonsContainer,children:[e.jsx(c.Tooltip,{title:"Palette",classes:{tooltip:I.tooltip},children:e.jsx(r,{"data-testid":"".concat("PaletteChromePicker","_palette"),onClick:function(){return k(l)},children:e.jsx(t.PaletteIcon,{className:u.default((x={},x[I.iconActive]=g===l,x)),size:24})})}),e.jsx(c.Tooltip,{title:"Pick your own",classes:{tooltip:I.tooltip},children:e.jsx(r,{"data-testid":"".concat("PaletteChromePicker","_pickOwn"),onClick:function(){return k(d)},children:e.jsx(t.PickerIcon,{className:u.default((h={},h[I.iconActive]=g===d,h)),size:24})})})]})]})}));module.exports=x;
