import{_ as c,u as d,a as r,A as _,S as f}from"./StreamlitVue.n2C9d_MV.js";import{d as p,w as m,r as i,e as g,f as v,o as u,c as y,a as b,h as B,b as E}from"./runtime-dom.esm-bundler.gORlFm-p.js";/* empty css                               */const C=p({__name:"DsfrButton",props:{args:{},width:{},disabled:{type:Boolean},theme:{}},setup(s,{expose:a}){a(),d();const o=s;m(()=>o.args,()=>{o.args.label||="Button",o.args.secondary??=!1,o.args.tertiary??=!1,o.args.disabled??=!1,o.args.iconOnly??=!1,o.args.iconRight??=!1,o.args.noOutline??=!1,o.args.size??=""},{deep:!0,immediate:!0});const e=i(!1),n=i(!1),t=z=>{!n.value&&e.value&&(e.value=!1,r.setComponentValue(e.value))};g(()=>{r.events.addEventListener(r.RENDER_EVENT,t)}),v(()=>{r.events.removeEventListener(r.RENDER_EVENT,t)});const l={props:o,clicked:e,isFocused:n,onRenderEvent:t,onClick:()=>{e.value||(e.value=!0,r.setComponentValue(e.value))},onFocus:()=>{n.value=!0},onBlur:()=>{n.value=!1},get DsfrButton(){return _}};return Object.defineProperty(l,"__isScriptSetup",{enumerable:!1,value:!0}),l}});function h(s,a,o,e,n,t){return u(),y("div",{class:"component",style:B(s.style)},[b(e.DsfrButton,{label:e.props.args.label,secondary:e.props.args.secondary,tertiary:e.props.args.tertiary,disabled:e.props.disabled||e.props.args.disabled,icon:e.props.args.icon,size:e.props.args.size,"no-outline":e.props.args.noOutline,"icon-only":e.props.args.iconOnly,"icon-right":e.props.args.iconRight,onClick:e.onClick,onFocus:e.onFocus,onBlur:e.onBlur},null,8,["label","secondary","tertiary","disabled","icon","size","no-outline","icon-only","icon-right"])],4)}const S=c(C,[["render",h]]),k=p({__name:"DsfrButton",setup(s,{expose:a}){a();const o={StreamlitComponent:f,Component:S};return Object.defineProperty(o,"__isScriptSetup",{enumerable:!1,value:!0}),o}});function D(s,a,o,e,n,t){return u(),E(e.StreamlitComponent,{component:e.Component,"client:load":""})}const w=c(k,[["render",D]]);export{w as default};
