"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[8615],{8615:(e,r,o)=>{o.r(r),o.d(r,{default:()=>h});var a=o(67758),l=o(7552),n=o(67112),s=o(61282),t=o(93062),c=o(76218),i=o(30698),m=o(69092),u=o(69500);function h(e){const r=(0,a.c)(29),{model:o,handleClose:h}=e,{minScore:b,maxScore:d,scaleType:N}=o,[x,_]=(0,l.useState)(`${b!==Number.MIN_VALUE?b:""}`),[g,S]=(0,l.useState)(`${d!==Number.MAX_VALUE?d:""}`),j=!(""!==x&&""!==g&&!Number.isNaN(+x)&&!Number.isNaN(+g))||+g>+x,A=!("log"===N&&""!==x&&!Number.isNaN(+x))||+x>0;let f,p,v,y,C,k,w,M,E;r[0]===Symbol.for("react.memo_cache_sentinel")?(f=(0,u.jsx)(s.A,{children:"Enter min/max score: "}),r[0]=f):f=r[0],r[1]!==j?(p=j?null:(0,u.jsx)(s.A,{color:"error",children:"Max is greater than or equal to min"}),r[1]=j,r[2]=p):p=r[2],r[3]!==A?(v=A?null:(0,u.jsx)(s.A,{color:"error",children:"Min score should be greater than 0 for log scale"}),r[3]=A,r[4]=v):v=r[4],r[5]===Symbol.for("react.memo_cache_sentinel")?(y=e=>{_(e.target.value)},r[5]=y):y=r[5],r[6]!==x?(C=(0,u.jsx)(t.A,{value:x,onChange:y,placeholder:"Enter min score"}),r[6]=x,r[7]=C):C=r[7],r[8]===Symbol.for("react.memo_cache_sentinel")?(k=e=>{S(e.target.value)},r[8]=k):k=r[8],r[9]!==g?(w=(0,u.jsx)(t.A,{value:g,onChange:k,placeholder:"Enter max score"}),r[9]=g,r[10]=w):w=r[10],r[11]!==p||r[12]!==v||r[13]!==C||r[14]!==w?(M=(0,u.jsxs)(c.A,{children:[f,p,v,C,w]}),r[11]=p,r[12]=v,r[13]=C,r[14]=w,r[15]=M):M=r[15],r[16]===Symbol.for("react.memo_cache_sentinel")?(E={marginLeft:20},r[16]=E):E=r[16];const L=!j;let T,U,V;return r[17]!==h||r[18]!==g||r[19]!==x||r[20]!==o?(T=()=>{o.setMinScore(""===x||Number.isNaN(+x)?void 0:+x),o.setMaxScore(""===g||Number.isNaN(+g)?void 0:+g),h()},r[17]=h,r[18]=g,r[19]=x,r[20]=o,r[21]=T):T=r[21],r[22]!==T||r[23]!==L?(U=(0,u.jsx)(i.A,{children:(0,u.jsx)(m.A,{variant:"contained",color:"primary",type:"submit",style:E,disabled:L,onClick:T,children:"Submit"})}),r[22]=T,r[23]=L,r[24]=U):U=r[24],r[25]!==h||r[26]!==U||r[27]!==M?(V=(0,u.jsxs)(n.Dialog,{open:!0,onClose:h,title:"Set min/max score for track",children:[M,U]}),r[25]=h,r[26]=U,r[27]=M,r[28]=V):V=r[28],V}}}]);
//# sourceMappingURL=8615.7dce6100.chunk.js.map