import{_,u as S,G as V,a as u,S as C}from"./StreamlitVue.ZFQEvSxb.js";/* empty css                               */import{d as f,r as i,o as v,c as I,a as x,j as k,w as d,m as B,k as c,t as m,b as w}from"./runtime-dom.esm-bundler.xzzcc6UT.js";/* empty css                               */const D=f({__name:"DsfrInput",props:{args:{},width:{},disabled:{type:Boolean},theme:{}},setup(a,{expose:n}){n(),S();const o=a,e=i(o.args.modelValue??""),r=i(e.value);function t(){e.value!==r.value&&(r.value=e.value,e.value!==""&&o.args.type==="number"?u.setComponentValue(Number(e.value)):u.setComponentValue(e.value))}function s(l){const y=l.target;e.value=y.value}function b(){t()}function g(l){l.key==="Enter"&&t()}const p={props:o,value:e,lastValue:r,setComponentValue:t,onInput:s,onBlur:b,onKeydown:g,get DsfrInput(){return V}};return Object.defineProperty(p,"__isScriptSetup",{enumerable:!1,value:!0}),p}}),h={class:"component"};function j(a,n,o,e,r,t){return v(),I("div",h,[x(e.DsfrInput,B(e.props.args,{disabled:e.props.disabled||e.props.args.disabled,modelValue:e.value,"onUpdate:modelValue":n[0]||(n[0]=s=>e.value=s),onInput:e.onInput,onBlur:e.onBlur,onKeydown:e.onKeydown}),k({_: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"])])}const q=_(D,[["render",j],["__scopeId","data-v-17d449db"]]),K=f({__name:"DsfrInput",setup(a,{expose:n}){n();const o={StreamlitComponent:C,Component:q};return Object.defineProperty(o,"__isScriptSetup",{enumerable:!1,value:!0}),o}});function N(a,n,o,e,r,t){return v(),w(e.StreamlitComponent,{component:e.Component,"client:load":""})}const O=_(K,[["render",N]]);export{O as default};
