"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[4365],{54365:function(e,r,o){o.r(r),o.d(r,{default:function(){return x}});var n=o(96234),s=o(30969),t=o(92256),a=o(48651),c=o(66581),l=o(17984),i=o(70054),u=o(35436),d=o(69852),m=o(2374),h=o(88581),N=o(37574),b=(0,m.ZL)()((function(e){return{root:{},closeButton:{position:"absolute",right:e.spacing(1),top:e.spacing(1),color:e.palette.grey[500]}}}));function x(e){var r=b().classes,o=e.model,m=e.handleClose,x=o.minScore,f=o.maxScore,j=o.scaleType,p=(0,s.useState)("".concat(x!==Number.MIN_VALUE?x:"")),Z=(0,n.Z)(p,2),g=Z[0],v=Z[1],C=(0,s.useState)("".concat(f!==Number.MAX_VALUE?f:"")),S=(0,n.Z)(C,2),k=S[0],w=S[1],y=!(""!==g&&""!==k&&!Number.isNaN(+g)&&!Number.isNaN(+k))||+k>+g,M=!("log"===j&&""!==g&&!Number.isNaN(+g))||+g>0;return(0,N.jsxs)(t.Z,{open:!0,onClose:m,children:[(0,N.jsxs)(a.Z,{children:["Set min/max score for track",(0,N.jsx)(c.Z,{className:r.closeButton,onClick:m,children:(0,N.jsx)(h.Z,{})})]}),(0,N.jsx)(l.Z,{style:{overflowX:"hidden"},children:(0,N.jsxs)("div",{className:r.root,children:[(0,N.jsx)(i.Z,{children:"Enter min/max score: "}),y?null:(0,N.jsx)(i.Z,{color:"error",children:"Max is greater than or equal to min"}),M?null:(0,N.jsx)(i.Z,{color:"error",children:"Min score should be greater than 0 for log scale"}),(0,N.jsx)(u.Z,{value:g,onChange:function(e){v(e.target.value)},placeholder:"Enter min score"}),(0,N.jsx)(u.Z,{value:k,onChange:function(e){w(e.target.value)},placeholder:"Enter max score"}),(0,N.jsx)(d.Z,{variant:"contained",color:"primary",type:"submit",style:{marginLeft:20},disabled:!y,onClick:function(){o.setMinScore(""===g||Number.isNaN(+g)?void 0:+g),o.setMaxScore(""===k||Number.isNaN(+k)?void 0:+k),m()},children:"Submit"})]})})]})}}}]);
//# sourceMappingURL=4365.4d6c2d31.chunk.js.map