import{_ as c,u as f,z as b,a as g,S as C}from"./StreamlitVue.3lsU-Xtu.js";import{d as i,o as _,c as h,a as v,m as S,b as U}from"./runtime-dom.esm-bundler.W8VUoGb5.js";/* empty css                               */const x=i({__name:"DsfrFileUpload",props:{args:{},width:{},disabled:{type:Boolean},theme:{}},setup(s,{expose:o}){o(),f();const a=s;let e,n=e;function r(){e!==n&&(n=e,g.setComponentValue(e))}function u(t){if(t&&t.length>0){const l=t[0],p=new FileReader;p.addEventListener("load",()=>{const m=p.result.split(",")[1];e={name:l.name,type:l.type,data:m},r()}),p.readAsDataURL(l)}else e=void 0,r()}const d={props:a,get value(){return e},set value(t){e=t},get lastValue(){return n},set lastValue(t){n=t},setComponentValue:r,onChange:u,get DsfrFileUpload(){return b}};return Object.defineProperty(d,"__isScriptSetup",{enumerable:!1,value:!0}),d}}),D={class:"component"};function F(s,o,a,e,n,r){return _(),h("div",D,[v(e.DsfrFileUpload,S(e.props.args,{disabled:e.props.disabled||e.props.args.disabled,onChange:e.onChange}),null,16,["disabled"])])}const V=c(x,[["render",F]]),y=i({__name:"DsfrFileUpload",setup(s,{expose:o}){o();const a={StreamlitComponent:C,Component:V};return Object.defineProperty(a,"__isScriptSetup",{enumerable:!1,value:!0}),a}});function B(s,o,a,e,n,r){return _(),U(e.StreamlitComponent,{component:e.Component,"client:load":""})}const w=c(y,[["render",B]]);export{w as default};
