"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[8976],{58976:(e,t,l)=>{l.r(t),l.d(t,{default:()=>u});var s=l(87083),o=l(7552),n=l(99546),r=l(7946),i=l(61282),a=l(22762),h=l(46275),d=l(69500);function c({rows:e,columns:t}){const[l,s]=(0,o.useState)(!1),c=t.map((t=>(0,n.measureGridWidth)(e.map((e=>e[t.field])))));return e.length?(0,d.jsxs)("div",{children:[(0,d.jsx)(r.A,{label:(0,d.jsx)(i.A,{variant:"body2",children:"Show options"}),control:(0,d.jsx)(a.A,{checked:l,onChange:e=>{s(e.target.checked)}})}),(0,d.jsx)(h.z,{rowHeight:25,hideFooter:e.length<100,rows:e,showToolbar:l,columns:t.map(((e,t)=>({...e,width:c[t]})))})]}):null}function u({data:e,fields:t,title:l}){return e.length?(0,d.jsx)(s.default,{title:l,children:(0,d.jsx)(c,{rows:e.map(((e,l)=>({id:l,...Object.fromEntries(e.split("|").map(((e,l)=>[t[l],e])))}))),columns:t.map((e=>({field:e})))})}):null}}}]);
//# sourceMappingURL=8976.fb704145.chunk.js.map