import{p as d,i as a}from"./i18n-eTakDDhg.js";import{R as E,S as _,X as t,w as n,a as b,a5 as l,a6 as M,T as W,W as x}from"./index-BkylzejB.js";import{s as y}from"./snippet-CC9u6I34.js";import{I as i}from"./ScrollFade.svelte_svelte_type_style_lang-De9nUaYy.js";import{D as L}from"./DownloadLink-Bx9WBqOo.js";import{C as R}from"./Clear-Daql2pLY.js";import{D as S}from"./Download-CPfSgwpW.js";import{E as T}from"./Edit-Yb37hOX4.js";import{U as X}from"./Undo-glJl2cU-.js";import{I as j}from"./IconButtonWrapper-33oacT7w.js";var q=x("<!> <!> <!> <!> <!>",1);function Y(h,e){E(e,!0);let I=d(e,"editable",3,!1),w=d(e,"undoable",3,!1),m=d(e,"download",3,null);j(h,{children:(k,z)=>{var c=q(),f=_(c);{var p=o=>{{let r=l(()=>e.i18n("common.edit"));i(o,{get Icon(){return T},get label(){return n(r)},onclick:()=>e.onedit?.()})}};a(f,o=>{I()&&o(p)})}var s=t(f,2);{var D=o=>{{let r=l(()=>e.i18n("common.undo"));i(o,{get Icon(){return X},get label(){return n(r)},onclick:()=>e.onundo?.()})}};a(s,o=>{w()&&o(D)})}var u=t(s,2);{var P=o=>{L(o,{get href(){return m()},download:!0,children:(r,v)=>{{let C=l(()=>e.i18n("common.download"));i(r,{get Icon(){return S},get label(){return n(C)}})}},$$slots:{default:!0}})};a(u,o=>{m()&&o(P)})}var g=t(u,2);{var U=o=>{var r=M(),v=_(r);y(v,()=>e.children),b(o,r)};a(g,o=>{e.children&&o(U)})}var B=t(g,2);{let o=l(()=>e.i18n("common.clear"));i(B,{get Icon(){return R},get label(){return n(o)},onclick:r=>{e.onclear?.(),r.stopPropagation()}})}b(k,c)},$$slots:{default:!0}}),W()}export{Y as M};
