"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[8615],{8615:(e,r,a)=>{a.r(r),a.d(r,{default:()=>m});var o=a(7552),l=a(67112),s=a(76218),n=a(61282),i=a(93062),t=a(30698),c=a(69092),u=a(69500);function m(e){const{model:r,handleClose:a}=e,{minScore:m,maxScore:h,scaleType:b}=r,[d,N]=(0,o.useState)(`${m!==Number.MIN_VALUE?m:""}`),[x,g]=(0,o.useState)(`${h!==Number.MAX_VALUE?h:""}`),j=!(""!==d&&""!==x&&!Number.isNaN(+d)&&!Number.isNaN(+x))||+x>+d,A=!("log"===b&&""!==d&&!Number.isNaN(+d))||+d>0;return(0,u.jsxs)(l.Dialog,{open:!0,onClose:a,title:"Set min/max score for track",children:[(0,u.jsxs)(s.A,{children:[(0,u.jsx)(n.A,{children:"Enter min/max score: "}),j?null:(0,u.jsx)(n.A,{color:"error",children:"Max is greater than or equal to min"}),A?null:(0,u.jsx)(n.A,{color:"error",children:"Min score should be greater than 0 for log scale"}),(0,u.jsx)(i.A,{value:d,onChange:e=>{N(e.target.value)},placeholder:"Enter min score"}),(0,u.jsx)(i.A,{value:x,onChange:e=>{g(e.target.value)},placeholder:"Enter max score"})]}),(0,u.jsx)(t.A,{children:(0,u.jsx)(c.A,{variant:"contained",color:"primary",type:"submit",style:{marginLeft:20},disabled:!j,onClick:()=>{r.setMinScore(""===d||Number.isNaN(+d)?void 0:+d),r.setMaxScore(""===x||Number.isNaN(+x)?void 0:+x),a()},children:"Submit"})})]})}}}]);
//# sourceMappingURL=8615.8d693f02.chunk.js.map