import{_ as c,u,A as m,a as l,S as _}from"./StreamlitVue.CglRiHNi.js";import{d as i,r as d,o as p,c as f,a as b,m as g,e as v,b as C}from"./runtime-dom.esm-bundler.CLhb1nSG.js";/* empty css                               */const k=i({__name:"DsfrButton",props:{args:{},width:{},disabled:{type:Boolean},theme:{}},setup(o,{expose:a}){a(),u();const t=o,e=d(!1);async function s(){t.args.link?window.open(t.args.link,"_blank")?.focus():t.args.copy&&navigator.clipboard.writeText(t.args.copy).catch(r=>{console.error("Failed to copy:",r)}),e.value&&(e.value=!1,l.setComponentValue(e.value),await new Promise(r=>setTimeout(r,50))),e.value=!0,l.setComponentValue(e.value),await new Promise(r=>setTimeout(r,50)),e.value=!1,l.setComponentValue(e.value)}const n={props:t,clicked:e,onClick:s,get DsfrButton(){return m}};return Object.defineProperty(n,"__isScriptSetup",{enumerable:!1,value:!0}),n}});function y(o,a,t,e,s,n){return p(),f("div",{class:"component",style:v(o.style)},[b(e.DsfrButton,g(e.props.args,{label:e.props.args.label||"Button",disabled:e.props.disabled||e.props.args.disabled,onClick:e.onClick}),null,16,["label","disabled"])],4)}const B=c(k,[["render",y]]),S=i({__name:"DsfrButton",setup(o,{expose:a}){a();const t={StreamlitComponent:_,Component:B};return Object.defineProperty(t,"__isScriptSetup",{enumerable:!1,value:!0}),t}});function w(o,a,t,e,s,n){return p(),C(e.StreamlitComponent,{component:e.Component,"client:load":""})}const P=c(S,[["render",w]]);export{P as default};
