"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[8300],{98300:(e,r,a)=>{a.r(r),a.d(r,{default:()=>i});var t=a(66204),l=a(29520),n=a(80013),o=a(46338),c=a(62301),s=a(7146),m=a(35421);function i(e){const{model:r,handleClose:a}=e,{minScore:i,maxScore:u,scaleType:b}=r,[N,E]=(0,t.useState)(`${i!==Number.MIN_VALUE?i:""}`),[h,d]=(0,t.useState)(`${u!==Number.MAX_VALUE?u:""}`),g=!(""!==N&&""!==h&&!Number.isNaN(+N)&&!Number.isNaN(+h))||+h>+N,p=!("log"===b&&""!==N&&!Number.isNaN(+N))||+N>0;return t.createElement(m.Dialog,{open:!0,onClose:a,title:"Set min/max score for track"},t.createElement(l.Z,null,t.createElement(n.Z,null,"Enter min/max score: "),g?null:t.createElement(n.Z,{color:"error"},"Max is greater than or equal to min"),p?null:t.createElement(n.Z,{color:"error"},"Min score should be greater than 0 for log scale"),t.createElement(o.Z,{value:N,onChange:e=>E(e.target.value),placeholder:"Enter min score"}),t.createElement(o.Z,{value:h,onChange:e=>d(e.target.value),placeholder:"Enter max score"})),t.createElement(c.Z,null,t.createElement(s.Z,{variant:"contained",color:"primary",type:"submit",style:{marginLeft:20},disabled:!g,onClick:()=>{r.setMinScore(""===N||Number.isNaN(+N)?void 0:+N),r.setMaxScore(""===h||Number.isNaN(+h)?void 0:+h),a()}},"Submit")))}}}]);
//# sourceMappingURL=8300.2d144eab.chunk.js.map