import r from"@babel/runtime/helpers/defineProperty";import{makeStyles as t}from"@material-ui/core";import{getHoverAreaSize as i}from"../utils.js";function e(r,t){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);t&&(e=e.filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),i.push.apply(i,e)}return i}function o(t){for(var i=1;i<arguments.length;i++){var o=null!=arguments[i]?arguments[i]:{};i%2?e(Object(o),!0).forEach((function(i){r(t,i,o[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(o,r))}))}return t}var n={minWidth:47,height:20,borderRadius:4},a=t((function(r){var t=r.isLightTheme,e=r.palette;return{root:{fontSize:"12px",position:"absolute","&:hover":{borderColor:e.primary.main},"&:active":{borderColor:e.primary.main},"&:hover $handle":{borderColor:e.primary.main},"&:active $handle":{background:e.primary.dark,borderColor:e.primary.main},"&:hover $inputRoot:not($hasError)":{background:e.primary.dark,border:"1px solid ".concat(e.primary.main)},"&:hover $inputRoot $hasError":{background:"".concat(e.background.b6," !important"),border:"1px solid ".concat(e.primary.main)},"&:active $inputRoot":{background:e.primary.dark,border:"1px solid ".concat(e.primary.main)},display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center","&:hover $leftArrow, &:active $leftArrow":{visibility:"visible"},"&:hover $rightArrow, &:active $rightArrow":{visibility:"visible"}},hasError:{border:"1px solid ".concat(e.error.main," !important"),"&.Mui-focused":{background:"".concat(e.background.b6," !important")},"&:hover":{background:e.background.b6},"&:hover $inputRoot":{background:e.background.b6}},horizontalHeadRoot:{top:0,bottom:0,right:5},horizontalTailRoot:{top:0,bottom:0,left:5},verticalHeadRoot:{left:0,right:0,bottom:5},verticalTailRoot:{left:0,right:0,top:5},handle:{position:"relative",background:t?"#B1B1B1":"#414141","& > p":{fontSize:"12px",textAlign:"center",lineHeight:"20px"},display:"flex",alignItems:"center",justifyContent:"center","&:before":{position:"absolute",left:"50%",top:"50%",height:function(r){var t=r.distance,e=r.hoverAreaHeight;return i({inititalSize:e,distance:t})},width:function(r){var t=r.distance,e=r.hoverAreaWidth;return i({distance:t,inititalSize:e})},content:'""',transform:"translate(-50%, -50%)",zIndex:100}},horizontalHeadHandle:function(r){return r.minimal?o(o({},n),{},{borderRadius:"unset",borderTopLeftRadius:2,borderBottomLeftRadius:2}):n},horizontalTailHandle:function(r){return r.minimal?o(o({},n),{},{borderRadius:"unset",borderTopRightRadius:2,borderBottomRightRadius:2}):n},verticalHeadHandle:function(r){return r.minimal?o(o({},n),{},{borderRadius:"unset",borderTopLeftRadius:2,borderTopRightRadius:2}):n},verticalTailHandle:function(r){return r.minimal?o(o({},n),{},{borderRadius:"unset",borderBottomRightRadius:2,borderBottomLeftRadius:2}):n},inputRoot:{borderRadius:4,minWidth:47,zIndex:101,height:"20px",fontSize:"12px",border:"1px solid ".concat(e.primary.text9),"&:hover":{border:"1px solid ".concat(e.primary.main)},"&:active":{textDecoration:"underline"},"&::before":{borderWidth:0},"&::after":{borderWidth:"1px !important"},"& .MuiInputBase-input":{padding:0,height:"100%",textAlign:"center"},"&:hover::before":{borderWidth:"1px !important"},"&.Mui-focused":{textDecoration:"underline",background:e.primary.dark,border:"1px solid ".concat(e.primary.main)}},minimalHandle:{background:"".concat(e.primary.text9," !important"),width:"8px !important",minWidth:"8px !important",minHeight:18,height:"18px !important","& .MuiInput-underline.Mui-error:after":{border:0},"&:before":{width:"0px !important",height:"0px !important"},"& $horizontalHeadHandle":{borderRadius:"0px !important"}},medium:{"& $minimalHandle":{minHeight:"24px !important"},"& $minimalVerticalHandle":{minHeight:"8px !important",minWidth:"24px !important"}},large:{"& $minimalHandle":{minHeight:"48px !important"},"& $minimalVerticalHandle":{minHeight:"8px !important",minWidth:"48px !important"}},minimalVerticalHandle:{width:18,minWidth:"18px !important",minHeight:8,height:"8px !important"},minimalHandleRoot:{borderColor:e.primary.text9,zIndex:100,"&:not(:hover)":{border:"none"}},leftArrow:{visibility:"hidden",zIndex:101,position:"absolute",left:-16},rightArrow:{visibility:"hidden",zIndex:101,position:"absolute",right:-15},reversedLeftArrow:{left:"50%",transform:"translateX(-50%) rotate(90deg)",top:-16},reversedRightArrow:{left:"50%",transform:"translateX(-50%) rotate(90deg)",bottom:-15},isInvisible:{display:"none"}}}));export{a as useHandleStyles};
