import{_ as c,u as d,a as n,S as _}from"./StreamlitVue.BzF8oK6q.js";import{D as v}from"./DsfrButton.DpDkSSeL.js";import{d as m,r as T,e as g,f as C,o as p,c as E,a as k,m as b,h as B,b as S}from"./runtime-dom.esm-bundler.CZSh2bQH.js";/* empty css                               *//* empty css                                */const D=m({__name:"DsfrButton",props:{args:{},width:{},disabled:{type:Boolean},theme:{}},setup(a,{expose:l}){l(),d();const r=a,e=T(!1);let o,t;function i(s){e.value&&t===void 0&&(e.value=!1,n.setComponentValue(e.value))}g(()=>{n.events.addEventListener(n.RENDER_EVENT,i)}),C(()=>{n.events.removeEventListener(n.RENDER_EVENT,i)});async function f(){e.value&&(e.value=!1,n.setComponentValue(e.value),await new Promise(s=>setTimeout(s,50))),e.value=!0,n.setComponentValue(e.value),o&&clearTimeout(o),t&&clearTimeout(t),t=-1,o=setTimeout(()=>{e.value=!1,n.setComponentValue(e.value),t=setTimeout(()=>{t=void 0},50),o=void 0},50)}const u={props:r,clicked:e,get toggleOffTimeout(){return o},set toggleOffTimeout(s){o=s},get lockTimeout(){return t},set lockTimeout(s){t=s},onRenderEvent:i,onClick:f,DsfrButton:v};return Object.defineProperty(u,"__isScriptSetup",{enumerable:!1,value:!0}),u}});function y(a,l,r,e,o,t){return p(),E("div",{class:"component",style:B(a.style)},[k(e.DsfrButton,b(e.props.args,{disabled:e.clicked||e.props.disabled||e.props.args.disabled,onClick:e.onClick}),null,16,["disabled"])],4)}const V=c(D,[["render",y]]),h=m({__name:"DsfrButton",setup(a,{expose:l}){l();const r={StreamlitComponent:_,Component:V};return Object.defineProperty(r,"__isScriptSetup",{enumerable:!1,value:!0}),r}});function x(a,l,r,e,o,t){return p(),S(e.StreamlitComponent,{component:e.Component,"client:load":""})}const $=c(h,[["render",x]]);export{$ as default};
