import{o as g,a as m,R as e,c as u,D as p,T as r,d,e as E,B as n}from"./index-Bm2SqMk3.js";const y=g(function(l){const{model:s,handleClose:a}=l,[t,c]=m.useState(""),o=/^[A-Za-z][A-Za-z0-9]$/.exec(t);return e.createElement(u.Dialog,{open:!0,onClose:a,title:"Sort by tag"},e.createElement(p,null,e.createElement(r,null,"Set the tag to sort by"),e.createElement(r,{color:"textSecondary"},"Examples: HP for haplotype, RG for read group, etc."),e.createElement(d,{value:t,onChange:i=>{c(i.target.value)},placeholder:"Enter tag name",error:t.length===2&&!o,helperText:t.length===2&&!o?"Not a valid tag":"",autoComplete:"off","data-testid":"sort-tag-name",slotProps:{htmlInput:{maxLength:2,"data-testid":"sort-tag-name-input"}}}),e.createElement(E,null,e.createElement(n,{variant:"contained",color:"primary",type:"submit",autoFocus:!0,onClick:()=>{s.setSortedBy("tag",t),a()}},"Submit"),e.createElement(n,{variant:"contained",color:"secondary",onClick:()=>{a()}},"Cancel"))))});export{y as default};
