import{f as d}from"./DAU1O6t8.js";import{_ as o,o as r,c as f,r as u,i as p,t as h,a as m,n as c,b5 as n}from"./Co0rzPff.js";const g={components:{},props:{prompt:{type:String,default:"Select file"},multiple:{type:Boolean,default:!1},accept:{type:String,default:null},maxSize:{type:Number,default:null},showIcon:{type:Boolean,default:!0},shouldAlwaysReset:{type:Boolean,default:!1},longStyle:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["change"],data(){return{files:[]}},methods:{addFiles(l,e){(!e||this.shouldAlwaysReset)&&(this.files=l);const t={maxSize:this.maxSize,alertOnInvalid:!0};this.files=[...this.files].filter(i=>d(i,t)),this.files.length>0&&this.$emit("change",this.files)},handleDrop(l){this.addFiles(l.dataTransfer.files)},handleChange(l){this.addFiles(l.target.files)}}},y=["disabled"],b=["multiple","accept","disabled"];function S(l,e,t,i,B,a){return r(),f("label",{class:c({"long-style":t.longStyle}),disabled:t.disabled,onDrop:e[1]||(e[1]=n((...s)=>a.handleDrop&&a.handleDrop(...s),["prevent"])),onDragover:e[2]||(e[2]=n(()=>{},["prevent"]))},[u(l.$slots,"default",{},void 0,!0),p(" "+h(t.prompt)+" ",1),m("input",{type:"file",multiple:t.multiple,accept:t.accept,disabled:t.disabled,onChange:e[0]||(e[0]=(...s)=>a.handleChange&&a.handleChange(...s))},null,40,b)],42,y)}const x=o(g,[["render",S],["__scopeId","data-v-fe2b6179"]]);export{x as F};