"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[8615],{8615:(e,r,a)=>{a.r(r),a.d(r,{default:()=>i});var t=a(7552),l=a(29499),n=a(36715),o=a(1343),c=a(58507),s=a(5401),m=a(49823);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,A=!("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.A,null,t.createElement(n.A,null,"Enter min/max score: "),g?null:t.createElement(n.A,{color:"error"},"Max is greater than or equal to min"),A?null:t.createElement(n.A,{color:"error"},"Min score should be greater than 0 for log scale"),t.createElement(o.A,{value:N,onChange:e=>{E(e.target.value)},placeholder:"Enter min score"}),t.createElement(o.A,{value:h,onChange:e=>{d(e.target.value)},placeholder:"Enter max score"})),t.createElement(c.A,null,t.createElement(s.A,{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=8615.0950a86f.chunk.js.map