"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[6587],{46587:(e,t,a)=>{a.r(t),a.d(t,{default:()=>m});var n=a(7552),c=a(68446),o=a(33371),r=a(32808),l=a(29499),s=a(58507),i=a(5401),d=a(75785),k=a(36422),h=a(49823),p=a(99546);const u=(0,d.n9)()({block:{display:"block"}});function w(e){return e.map((({id:e,displays:t,...a})=>({...a,displays:t.map((({id:e,...t})=>t))})))}function b({checked:e,label:t,onChange:a}){const{classes:c}=u();return n.createElement(o.A,{className:c.block,control:n.createElement(r.A,{checked:e,onChange:a}),label:t})}const m=(0,c.observer)((function({model:e,handleClose:t,feature:a,viewType:c}){const[o,r]=(0,n.useState)(!0),[d,u]=(0,n.useState)(!0);return n.createElement(h.Dialog,{open:!0,onClose:t,title:"Breakpoint split view options"},n.createElement(l.A,null,n.createElement(b,{checked:o,onChange:e=>{r(e.target.checked)},label:"Copy tracks into the new view"}),n.createElement(b,{checked:d,onChange:e=>{u(e.target.checked)},label:"Mirror tracks vertically in vertically stacked view"})),n.createElement(s.A,null,n.createElement(i.A,{onClick:()=>{const{view:n}=e,o=(0,p.getSession)(e);try{const e=c.snapshotFromBreakendFeature(a,n),[t,r]=e.views,l=(0,k.getSnapshot)(n.tracks);o.addView("BreakpointSplitView",{...e,views:[{...t,tracks:w(l),offsetPx:t.offsetPx-n.width/2+100},{...r,tracks:w(d?[...l].reverse():l),offsetPx:r.offsetPx-n.width/2+100}]})}catch(e){console.error(e),o.notify(`${e}`)}t()},variant:"contained",color:"primary",autoFocus:!0},"OK"),n.createElement(i.A,{onClick:()=>{t()},color:"secondary",variant:"contained"},"Cancel")))}))}}]);
//# sourceMappingURL=6587.12782a2b.chunk.js.map