import{p as r,e as j,i as f,a as W,b as q,k as A,u as D}from"./i18n-Dnhn5Rxr.js";import{R,G as v,z as d,t as y,Z as E,a as l,T,U as z,V as w,a0 as F,W as B,Y as C,X as H,a6 as h,S as x,w as G}from"./index-DWyDLubb.js";import{s as J}from"./snippet-BWgYNF9D.js";import"./ScrollFade.svelte_svelte_type_style_lang-DPHOQHBm.js";var K=B('<span class="custom-button-label svelte-gnx6f7"> </span>'),L=B('<button class="custom-button svelte-gnx6f7"><!></button>');function M(b,a){R(a,!1);let t=r(a,"button",12),u=r(a,"on_click",12);var p={get button(){return t()},set button(e){t(e),z()},get on_click(){return u()},set on_click(e){u(e),z()}};j();var n=L(),_=w(n);{var s=e=>{var i=K(),m=w(i,!0);C(i),y(()=>F(m,(v(t()),d(()=>t().value)))),l(e,i)};f(_,e=>{v(t()),d(()=>t().value)&&e(s)})}return C(n),y(()=>{W(n,"title",(v(t()),d(()=>t().value||""))),W(n,"aria-label",(v(t()),d(()=>t().value||"Custom action")))}),E("click",n,()=>u()(t().id)),l(b,n),T(p)}var N=B("<div><!> <!></div>");function tt(b,a){R(a,!0);let t=r(a,"top_panel",3,!0),u=r(a,"display_top_corner",3,!1),p=r(a,"show_background",3,!0),n=r(a,"buttons",3,null),_=r(a,"on_custom_button_click",3,null);var s=N(),e=w(s);{var i=o=>{var c=h(),g=x(c);J(g,()=>a.children),l(o,c)};f(e,o=>{a.children&&o(i)})}var m=H(e,2);{var U=o=>{var c=h(),g=x(c);A(g,17,n,D,(V,I)=>{var S=h(),X=x(S);{var Y=k=>{M(k,{get button(){return G(I)},on_click:Z=>{_()&&_()(Z)}})};f(X,k=>{typeof G(I)!="string"&&k(Y)})}l(V,S)}),l(o,c)};f(m,o=>{n()&&o(U)})}C(s),y(()=>q(s,1,`icon-button-wrapper ${t()?"top-panel":""} ${u()?"display-top-corner":"hide-top-corner"} ${p()?"":"no-background"}`,"svelte-1pnho82")),l(b,s),T()}export{M as C,tt as I};
