import{d as B,b8 as E,L,r as b,f as O,o as n,c as w,a as r,h as I,t as P,g as a,w as l,x as Q,q as g,Q as S,j as W,k as F,D as G,az as H,E as J,ba as K,p as N,l as R,_ as X,__tla as Y}from"./index-7d5b26d3.js";import{W as Z,__tla as $}from"./main-6e566452.js";import aa,{__tla as ta}from"./main-21b2f3a7.js";import{u as ea,U as la,__tla as ra}from"./useUpload-8fce1b59.js";import{u as sa,__tla as _a}from"./useMessage-c81eaa5b.js";import{__tla as oa}from"./index-966eea36.js";import{__tla as ca}from"./index-cdb8fe72.js";import{__tla as ua}from"./main-a6251aa9.js";import{__tla as ia}from"./el-image-c9079635.js";import{__tla as na}from"./el-image-viewer-2f0c9a58.js";import{__tla as ma}from"./main-0e4d12b4.js";import{__tla as da}from"./index-7f060851.js";import{__tla as pa}from"./index-4dabe3cf.js";import{__tla as fa}from"./formatTime-5152c108.js";let k,ya=Promise.all([(()=>{try{return Y}catch{}})(),(()=>{try{return $}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return ca}catch{}})(),(()=>{try{return ua}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return pa}catch{}})(),(()=>{try{return fa}catch{}})()]).then(async()=>{let m,d,p;m={key:0,class:"select-item2"},d={class:"item-name"},p=(s=>(N("data-v-17bdaa79"),s=s(),R(),s))(()=>I("div",{class:"el-upload__tip"}," \u683C\u5F0F\u652F\u6301 mp3/wma/wav/amr\uFF0C\u6587\u4EF6\u5927\u5C0F\u4E0D\u8D85\u8FC7 2M\uFF0C\u64AD\u653E\u957F\u5EA6\u4E0D\u8D85\u8FC7 60s ",-1)),k=X(B({__name:"TabVoice",props:{modelValue:{type:Object,required:!0}},emits:["update:modelValue"],setup(s,{emit:x}){const j=sa(),z={Authorization:"Bearer "+E()},C=s,q=x,e=L({get:()=>C.modelValue,set:t=>q("update:modelValue",t)}),_=b(!1),f=b([]),c=O({accountId:e.value.accountId,type:"voice",title:"",introduction:""}),D=t=>ea(la.Voice,10)(t),M=t=>{if(t.code!==0)return j.error("\u4E0A\u4F20\u51FA\u9519\uFF1A"+t.msg),!1;f.value=[],c.title="",c.introduction="",y(t.data)},T=()=>{e.value.mediaId=null,e.value.url=null,e.value.name=null},y=t=>{_.value=!1,e.value.mediaId=t.mediaId,e.value.url=t.url,e.value.name=t.name};return(t,o)=>{const u=W,v=F,i=G,U=H,h=J,A=K;return n(),w("div",null,[r(e).url?(n(),w("div",m,[I("p",d,P(r(e).name),1),a(u,{class:"ope-row",justify:"center"},{default:l(()=>[a(r(aa),{url:r(e).url},null,8,["url"])]),_:1}),a(u,{class:"ope-row",justify:"center"},{default:l(()=>[a(i,{type:"danger",circle:"",onClick:T},{default:l(()=>[a(v,{icon:"ep:delete"})]),_:1})]),_:1})])):(n(),Q(u,{key:1,style:{"text-align":"center"}},{default:l(()=>[a(h,{span:12,class:"col-select"},{default:l(()=>[a(i,{type:"success",onClick:o[0]||(o[0]=V=>_.value=!0)},{default:l(()=>[g(" \u7D20\u6750\u5E93\u9009\u62E9"),a(v,{icon:"ep:circle-check"})]),_:1}),a(U,{title:"\u9009\u62E9\u8BED\u97F3",modelValue:r(_),"onUpdate:modelValue":o[1]||(o[1]=V=>S(_)?_.value=V:null),width:"90%","append-to-body":"","destroy-on-close":""},{default:l(()=>[a(r(Z),{type:"voice","account-id":r(e).accountId,onSelectMaterial:y},null,8,["account-id"])]),_:1},8,["modelValue"])]),_:1}),a(h,{span:12,class:"col-add"},{default:l(()=>[a(A,{action:"/dev-api/admin-api/mp/material/upload-temporary",headers:z,multiple:"",limit:1,"file-list":r(f),data:r(c),"before-upload":D,"on-success":M},{tip:l(()=>[p]),default:l(()=>[a(i,{type:"primary"},{default:l(()=>[g("\u70B9\u51FB\u4E0A\u4F20")]),_:1})]),_:1},8,["file-list","data"])]),_:1})]),_:1}))])}}}),[["__scopeId","data-v-17bdaa79"],["__file","D:/zx/mall-newfeifan-zx-business/src/views/mp/components/wx-reply/components/TabVoice.vue"]])});export{ya as __tla,k as default};
