"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[8300],{98300:(e,r,a)=>{a.r(r),a.d(r,{default:()=>m});var o=a(41867),s=a(47409),n=a(51590),l=a(49133),t=a(27768),c=a(23801),i=a(35421),u=a(80838);function m(e){const{model:r,handleClose:a}=e,{minScore:m,maxScore:d,scaleType:h}=r,[N,b]=(0,o.useState)("".concat(m!==Number.MIN_VALUE?m:"")),[x,j]=(0,o.useState)("".concat(d!==Number.MAX_VALUE?d:"")),g=!(""!==N&&""!==x&&!Number.isNaN(+N)&&!Number.isNaN(+x))||+x>+N,p=!("log"===h&&""!==N&&!Number.isNaN(+N))||+N>0;return(0,u.jsxs)(i.Dialog,{open:!0,onClose:a,title:"Set min/max score for track",children:[(0,u.jsxs)(s.Z,{children:[(0,u.jsx)(n.Z,{children:"Enter min/max score: "}),g?null:(0,u.jsx)(n.Z,{color:"error",children:"Max is greater than or equal to min"}),p?null:(0,u.jsx)(n.Z,{color:"error",children:"Min score should be greater than 0 for log scale"}),(0,u.jsx)(l.Z,{value:N,onChange:e=>b(e.target.value),placeholder:"Enter min score"}),(0,u.jsx)(l.Z,{value:x,onChange:e=>j(e.target.value),placeholder:"Enter max score"})]}),(0,u.jsx)(t.Z,{children:(0,u.jsx)(c.Z,{variant:"contained",color:"primary",type:"submit",style:{marginLeft:20},disabled:!g,onClick:()=>{r.setMinScore(""===N||Number.isNaN(+N)?void 0:+N),r.setMaxScore(""===x||Number.isNaN(+x)?void 0:+x),a()},children:"Submit"})})]})}}}]);
//# sourceMappingURL=8300.40f3d922.chunk.js.map