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