import{d as A,bB as E,Y as G,r as b,e as H,o as n,c as k,a as r,g as w,t as R,f as a,w as l,x as S,y as I,l as W,i as O,j as P,G as X,bk as Y,E as F,bD as J,p as K,k as L,_ as N,__tla as Q}from"./index-8dc1e40a.js";import{W as Z,__tla as $}from"./main-69d14ed2.js";import aa,{__tla as ta}from"./main-e9c0874d.js";import{u as ea,U as la,__tla as ra}from"./useUpload-18ed0543.js";import{u as sa,__tla as _a}from"./useMessage-7a27dd80.js";import{__tla as oa}from"./index-64aeaa78.js";import{__tla as ca}from"./index-803dbf9a.js";import{__tla as ua}from"./main-a65bb27b.js";import{__tla as ia}from"./el-image-6a48e9f1.js";import{__tla as na}from"./el-image-viewer-3b8905e6.js";import{__tla as ma}from"./main-e0b1ced1.js";import{__tla as da}from"./index-e8092043.js";import{__tla as pa}from"./index-df9490d5.js";import{__tla as fa}from"./formatTime-8a155b2e.js";let x,ya=Promise.all([(()=>{try{return Q}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=>(K("data-v-17bdaa79"),s=s(),L(),s))(()=>w("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)),x=N(A({__name:"TabVoice",props:{modelValue:{type:Object,required:!0}},emits:["update:modelValue"],setup(s,{emit:g}){const j=sa(),B={Authorization:"Bearer "+E()},U=s,z=g,e=G({get:()=>U.modelValue,set:t=>z("update:modelValue",t)}),_=b(!1),f=b([]),c=H({accountId:e.value.accountId,type:"voice",title:"",introduction:""}),C=t=>ea(la.Voice,10)(t),D=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)},M=()=>{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=O,v=P,i=X,T=Y,h=F,q=J;return n(),k("div",null,[r(e).url?(n(),k("div",m,[w("p",d,R(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:M},{default:l(()=>[a(v,{icon:"ep:delete"})]),_:1})]),_:1})])):(n(),S(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(()=>[I(" \u7D20\u6750\u5E93\u9009\u62E9"),a(v,{icon:"ep:circle-check"})]),_:1}),a(T,{title:"\u9009\u62E9\u8BED\u97F3",modelValue:r(_),"onUpdate:modelValue":o[1]||(o[1]=V=>W(_)?_.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(q,{action:"/dev-api/admin-api/mp/material/upload-temporary",headers:B,multiple:"",limit:1,"file-list":r(f),data:r(c),"before-upload":C,"on-success":D},{tip:l(()=>[p]),default:l(()=>[a(i,{type:"primary"},{default:l(()=>[I("\u70B9\u51FB\u4E0A\u4F20")]),_:1})]),_:1},8,["file-list","data"])]),_:1})]),_:1}))])}}}),[["__scopeId","data-v-17bdaa79"],["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/mp/components/wx-reply/components/TabVoice.vue"]])});export{ya as __tla,x as default};
