import{r as u,w as _}from"./vendor-39c32a1b.js";import{n as d}from"./index-8fa791df.js";const p={__name:"LJMediaInput",emits:["change"],setup(s,{expose:e,emit:t}){const n=u(),l=()=>{n.value.value="",n.value.click()},o=a=>a?a.indexOf("video")>-1?"video":a.indexOf("audio")>-1?"audio":a.indexOf("image")>-1?"image":"other":null,r=a=>(a/1024/1024).toFixed(2)+"MB",c=a=>{const i=a.target.files[0],f={raw:i,name:i.name,size:r(i.size),type:i.type};t("change",f)};return e({mediaClick:l}),{__sfc:!0,ljMediaInputRef:n,emits:t,mediaClick:l,getMediaType:o,getSize:r,changeMedia:c}}};var m=function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"lj-media-input"},[t("input",{ref:"ljMediaInputRef",attrs:{type:"file",accept:"video/*,audio/*",multiple:!1},on:{change:n.changeMedia}})])},g=[],v=d(p,m,g,!1,null,"5ee443df",null,null);const B=v.exports,w="/svg/video-icon-450c14c8.svg";const y={__name:"LJDialog",props:{value:{type:Boolean,default:!1},alignCenter:{type:Boolean,default:!1},center:{type:Boolean,default:!1},closeModal:{type:Boolean,default:!1},closeEsc:{type:Boolean,default:!1},destroyClose:{type:Boolean,default:!1},showClose:{type:Boolean,default:!0},isSubmit:{type:Boolean,default:!0},submitLoading:{type:Boolean,default:!1},footer:{type:Boolean,default:!0},title:{type:String,default:"\u63D0\u793A"},width:{type:String,default:"30%"},cancelText:{type:String,default:"\u53D6 \u6D88"},confirmText:{type:String,default:"\u786E \u5B9A"}},emits:["input","cancel","confirm"],setup(s,{emit:e}){const t=s,n=u(t.value);_(()=>t.value,a=>{n.value=a});const l=()=>{o()},o=()=>{n.value=!1,e("input",!1)};return{__sfc:!0,emits:e,props:t,dialogVisible:n,changeClose:l,handleClose:o,handleCancel:()=>{o()},handleConfirm:()=>{e("confirm"),!t.isSubmit&&o()}}}};var h=function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"lj-dialog-root"},[t("el-dialog",{staticClass:"lj-dialog-main",class:{"is-align-center":e.alignCenter},attrs:{"append-to-body":!0,"custom-class":"lj-dialog-content",center:e.center,"close-on-click-modal":e.closeModal,"close-on-press-escape":e.closeEsc,visible:n.dialogVisible,"show-close":e.showClose,"destroy-on-close":e.destroyClose,width:e.width},on:{"update:visible":function(l){n.dialogVisible=l},close:n.changeClose}},[e._t("title",function(){return[t("template",{slot:"title"},[e._v(" "+e._s(e.title)+" ")])]}),e._t("default",function(){return[t("span",[e._v("\u8FD9\u662F\u4E00\u6BB5\u4FE1\u606F")])]}),e._t("footer",function(){return[e.footer?t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:n.handleCancel}},[e._v(e._s(e.cancelText))]),t("el-button",{attrs:{type:"primary",loading:e.submitLoading},on:{click:n.handleConfirm}},[e._v(" "+e._s(e.confirmText)+" ")])],1):e._e()]})],2)],1)},C=[],x=d(y,h,C,!1,null,null,null,null);const L=x.exports;export{B as L,L as a,w as u};
