"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[1195],{91195:function(e,r,o){o.r(r),o.d(r,{default:function(){return x}});var n=o(96234),s=o(30969),t=o(22714),a=o(28599),c=o(7690),l=o(80975),i=o(83483),u=o(93138),d=o(64501),m=o(32343),h=o(14008),N=o(37574),b=(0,t.Z)((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(),o=e.model,t=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)(i.Z,{open:!0,onClose:t,children:[(0,N.jsxs)(d.Z,{children:["Set min/max score for track",(0,N.jsx)(m.Z,{className:r.closeButton,onClick:t,children:(0,N.jsx)(h.Z,{})})]}),(0,N.jsx)(u.Z,{style:{overflowX:"hidden"},children:(0,N.jsxs)("div",{className:r.root,children:[(0,N.jsx)(l.Z,{children:"Enter min/max score: "}),y?null:(0,N.jsx)(l.Z,{color:"error",children:"Max is greater than or equal to min"}),M?null:(0,N.jsx)(l.Z,{color:"error",children:"Min score should be greater than 0 for log scale"}),(0,N.jsx)(c.Z,{value:g,onChange:function(e){v(e.target.value)},placeholder:"Enter min score"}),(0,N.jsx)(c.Z,{value:k,onChange:function(e){w(e.target.value)},placeholder:"Enter max score"}),(0,N.jsx)(a.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),t()},children:"Submit"})]})})]})}}}]);
//# sourceMappingURL=1195.35ade7f1.chunk.js.map