import{_,u as S,G as V,a as i,S as h}from"./StreamlitVue.3lsU-Xtu.js";/* empty css                               */import{d as f,r as u,o as g,c as x,a as C,q as I,w as d,m as B,i as k,s as c,t as m,b as w}from"./runtime-dom.esm-bundler.W8VUoGb5.js";/* empty css                               */const D=f({__name:"DsfrInput",props:{args:{},width:{},disabled:{type:Boolean},theme:{}},setup(t,{expose:o}){o(),S();const r=t,e=u(r.args.modelValue??""),n=u(e.value);function a(){e.value!==n.value&&(n.value=e.value,e.value!==""&&r.args.type==="number"?i.setComponentValue(Number(e.value)):i.setComponentValue(e.value))}function s(l){const y=l.target;e.value=y.value}function v(){a()}function b(l){l.key==="Enter"&&a()}const p={props:r,value:e,lastValue:n,setComponentValue:a,onInput:s,onBlur:v,onKeydown:b,get DsfrInput(){return V}};return Object.defineProperty(p,"__isScriptSetup",{enumerable:!1,value:!0}),p}});function q(t,o,r,e,n,a){return g(),x("div",{class:"component",style:k({"--dsfr-input-height":e.props.args.height?`${e.props.args.height}px`:"5.75rem"})},[C(e.DsfrInput,B(e.props.args,{disabled:e.props.disabled||e.props.args.disabled,modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=s=>e.value=s),onInput:e.onInput,onBlur:e.onBlur,onKeydown:e.onKeydown}),I({_:2},[e.props.args.label?{name:"label",fn:d(()=>[c(m(e.props.args.label),1)]),key:"0"}:void 0,e.props.args.requiredTip?{name:"required-tip",fn:d(()=>[c(m(e.props.args.requiredTip),1)]),key:"1"}:void 0]),1040,["disabled","modelValue"])],4)}const K=_(D,[["render",q],["__scopeId","data-v-dc4eef68"]]),N=f({__name:"DsfrInput",setup(t,{expose:o}){o();const r={StreamlitComponent:h,Component:K};return Object.defineProperty(r,"__isScriptSetup",{enumerable:!1,value:!0}),r}});function P(t,o,r,e,n,a){return g(),w(e.StreamlitComponent,{component:e.Component,"client:load":""})}const O=_(N,[["render",P]]);export{O as default};
