import{__assign as o}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsxs as i,jsx as s}from"react/jsx-runtime";import{forwardRef as c,useState as n,useLayoutEffect as t}from"react";import{ChromePicker as e}from"react-color";import r from"classnames";import{makeStyles as a,Tooltip as p}from"@material-ui/core";import m from"./Palette/Palette.js";import l from"../../IconButton/index.js";import{PaletteIcon as d,PickerIcon as u}from"../../../icons/iconParkIcons.js";import"../../../icons/customIcons/icons/AddMessage.js";import"../../../icons/customIcons/icons/Attention.js";import"../../../icons/customIcons/icons/Collapse.js";import"../../../icons/customIcons/icons/Dashboard.js";import"../../../icons/customIcons/icons/Expand.js";import"../../../icons/customIcons/icons/FolderClosed.js";import"../../../icons/customIcons/icons/FolderClosedFilled.js";import"../../../icons/customIcons/icons/FolderOpened.js";import"../../../icons/customIcons/icons/GreaterOrEqual.js";import"../../../icons/customIcons/icons/LessOrEqual.js";import"../../../icons/customIcons/icons/Search.js";import"../../../icons/customIcons/icons/Wellhub.js";import"../../../icons/customIcons/icons/MultiRuler.js";import"../../../icons/customIcons/icons/Checkbox.js";import"../../../icons/customIcons/icons/CheckboxChecked.js";import"../../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../../icons/customIcons/icons/Radio.js";import"../../../icons/customIcons/icons/RadioChecked.js";import"../../../icons/customIcons/icons/SimulFrac.js";import"../../../icons/customIcons/icons/ZipperFrac.js";import"../../../icons/customIcons/icons/CautionFilled.js";import"../../../icons/customIcons/icons/MoreApp.js";var b="PALETTE",h="CHROME_PICKER",x={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"}}}},f=a({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"}}),j=c((function(c,a){var j,C,I=c.color,g=c.onChange,k=c.onSizeChange,P=c.enableTransparencyPalette,w=f(),y=n(b),R=y[0],v=y[1];return t(k,[R]),i("div",o({className:w.container,ref:a},{children:[R===b&&s(m,{className:w.chromePickerPalette,color:I,onChange:g,enableTransparencyPalette:P}),R===h&&s(e,{styles:x,color:I,onChange:g}),i("div",o({className:w.buttonsContainer},{children:[s(p,o({title:"Palette",classes:{tooltip:w.tooltip}},{children:s(l,o({"data-testid":"".concat("PaletteChromePicker","_palette"),onClick:function(){return v(b)}},{children:s(d,{className:r((j={},j[w.iconActive]=R===b,j)),size:24})}))})),s(p,o({title:"Pick your own",classes:{tooltip:w.tooltip}},{children:s(l,o({"data-testid":"".concat("PaletteChromePicker","_pickOwn"),onClick:function(){return v(h)}},{children:s(u,{className:r((C={},C[w.iconActive]=R===h,C)),size:24})}))}))]}))]}))}));export{j as default};
