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