import{p as d,i as a}from"./i18n-Dnhn5Rxr.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-DWyDLubb.js";import{s as y}from"./snippet-BWgYNF9D.js";import{I as i}from"./ScrollFade.svelte_svelte_type_style_lang-DPHOQHBm.js";import{D as L}from"./DownloadLink-TGTaev7f.js";import{C as R}from"./Clear-BF6j078A.js";import{D as S}from"./Download-Di2PsS6O.js";import{E as T}from"./Edit-D-unDhOb.js";import{U as X}from"./Undo-C2-jWGVL.js";import{I as j}from"./IconButtonWrapper-D0s9l4wW.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};
