import{s as a}from"./chunk-DZLz74EQ.js";import{E as p,nt as d,p as f}from"./cells-B6jS0AIj.js";import{n as u,t as c}from"./jsx-runtime-DvsdsEjx.js";import{t as C}from"./use-toast-BiL_AQz9.js";import{n as h}from"./useEvent-d8iQXgui.js";import{r as v}from"./useDeleteCell-BSTJX7_O.js";var x=a(u(),1),b=a(c(),1);function j(){let t=(0,x.c)(3),{splitCell:i,undoSplitCell:o}=p(),s;return t[0]!==i||t[1]!==o?(s=l=>{let r=f(l.cellId);if(!r)return;let n=d(r);i(l);let{dismiss:e}=C({title:"Cell split",action:(0,b.jsx)(v,{"data-testid":"undo-split-button",size:"sm",variant:"outline",onClick:()=>{o({...l,snapshot:n}),m()},children:"Undo"})}),m=e},t[0]=i,t[1]=o,t[2]=s):s=t[2],h(s)}export{j as t};
