"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("@babel/runtime/helpers/defineProperty"),t=require("@material-ui/core"),e=require("../utils.js");function i(r){return r&&"object"==typeof r&&"default"in r?r:{default:r}}var o=i(r);function n(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),e.push.apply(e,i)}return e}function a(r){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?n(Object(e),!0).forEach((function(t){o.default(r,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):n(Object(e)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))}))}return r}var d={minWidth:47,height:20,borderRadius:4},l=t.makeStyles((function(r){var t=r.isLightTheme,i=r.palette;return{root:{fontSize:"12px",position:"absolute","&:hover":{borderColor:i.primary.main},"&:active":{borderColor:i.primary.main},"&:hover $handle":{borderColor:i.primary.main},"&:active $handle":{background:i.primary.dark,borderColor:i.primary.main},"&:hover $inputRoot:not($hasError)":{background:i.primary.dark,border:"1px solid ".concat(i.primary.main)},"&:hover $inputRoot $hasError":{background:"".concat(i.background.b6," !important"),border:"1px solid ".concat(i.primary.main)},"&:active $inputRoot":{background:i.primary.dark,border:"1px solid ".concat(i.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(i.error.main," !important"),"&.Mui-focused":{background:"".concat(i.background.b6," !important")},"&:hover":{background:i.background.b6},"&:hover $inputRoot":{background:i.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,i=r.hoverAreaHeight;return e.getHoverAreaSize({inititalSize:i,distance:t})},width:function(r){var t=r.distance,i=r.hoverAreaWidth;return e.getHoverAreaSize({distance:t,inititalSize:i})},content:'""',transform:"translate(-50%, -50%)",zIndex:100}},horizontalHeadHandle:function(r){return r.minimal?a(a({},d),{},{borderRadius:"unset",borderTopLeftRadius:2,borderBottomLeftRadius:2}):d},horizontalTailHandle:function(r){return r.minimal?a(a({},d),{},{borderRadius:"unset",borderTopRightRadius:2,borderBottomRightRadius:2}):d},verticalHeadHandle:function(r){return r.minimal?a(a({},d),{},{borderRadius:"unset",borderTopLeftRadius:2,borderTopRightRadius:2}):d},verticalTailHandle:function(r){return r.minimal?a(a({},d),{},{borderRadius:"unset",borderBottomRightRadius:2,borderBottomLeftRadius:2}):d},inputRoot:{borderRadius:4,minWidth:47,zIndex:101,height:"20px",fontSize:"12px",border:"1px solid ".concat(i.primary.text9),"&:hover":{border:"1px solid ".concat(i.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:i.primary.dark,border:"1px solid ".concat(i.primary.main)}},minimalHandle:{background:"".concat(i.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:i.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"}}}));exports.useHandleStyles=l;
