"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[5808],{95808:(e,l,t)=>{t.r(l),t.d(l,{default:()=>b});var s=t(87083),n=t(7552),o=t(99546),r=t(33371),a=t(32808),i=t(36715),c=t(28237),d=t(76157),u=t(69500);function h({rows:e,columns:l}){const[t,s]=(0,n.useState)(!1),h=l.map((l=>(0,o.measureGridWidth)(e.map((e=>e[l.field])))));return e.length?(0,u.jsxs)("div",{children:[(0,u.jsx)(r.A,{control:(0,u.jsx)(a.A,{checked:t,onChange:e=>{s(e.target.checked)}}),label:(0,u.jsx)(i.A,{variant:"body2",children:"Show options"})}),(0,u.jsx)(c.z,{rowHeight:25,rows:e,columns:l.map(((e,l)=>({...e,width:h[l]}))),slots:{toolbar:t?d.O:null}})]}):null}function b({data:e,fields:l,title:t}){return e.length?(0,u.jsx)(s.default,{title:t,children:(0,u.jsx)(h,{rows:e.map(((e,t)=>({id:t,...Object.fromEntries(e.split("|").map(((e,t)=>[l[t],e])))}))),columns:l.map((e=>({field:e})))})}):null}}}]);
//# sourceMappingURL=5808.bdd22546.chunk.js.map