"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[2697],{32697:(e,t,a)=>{a.r(t),a.d(t,{default:()=>u});var o=a(7552),r=a(67112),n=a(76218),l=a(61282),s=a(93062),c=a(30698),i=a(69092),d=a(68446),h=a(69500);const u=(0,d.observer)(function(e){const{model:t,handleClose:a}=e,[d,u]=(0,o.useState)(""),g=/^[A-Za-z][A-Za-z0-9]$/.exec(d);return(0,h.jsx)(r.Dialog,{open:!0,onClose:a,title:"Sort by tag",children:(0,h.jsxs)(n.A,{children:[(0,h.jsx)(l.A,{children:"Set the tag to sort by"}),(0,h.jsx)(l.A,{color:"textSecondary",children:"Examples: HP for haplotype, RG for read group, etc."}),(0,h.jsx)(s.A,{value:d,onChange:e=>{u(e.target.value)},placeholder:"Enter tag name",error:2===d.length&&!g,helperText:2!==d.length||g?"":"Not a valid tag",autoComplete:"off","data-testid":"sort-tag-name",slotProps:{htmlInput:{maxLength:2,"data-testid":"sort-tag-name-input"}}}),(0,h.jsxs)(c.A,{children:[(0,h.jsx)(i.A,{variant:"contained",color:"primary",type:"submit",autoFocus:!0,onClick:()=>{t.setSortedBy("tag",d),a()},children:"Submit"}),(0,h.jsx)(i.A,{variant:"contained",color:"secondary",onClick:()=>{a()},children:"Cancel"})]})]})})})}}]);
//# sourceMappingURL=2697.b50efe66.chunk.js.map