import{d as q,co as z,b as B,r as V,f as G,o as n,c as w,a as r,g,t as H,i as a,w as l,l as J,j as I,y as S,s as W,v as D,J as F,cu as K,E as L,bo as N,ac as Q,ad as R,_ as X,__tla as Y}from"./index-2c56227b.js";import{W as Z,__tla as $}from"./main-537690f3.js";import aa,{__tla as ta}from"./main-319f3859.js";import{u as ea,U as la,__tla as ra}from"./useUpload-d01a20c8.js";import{u as oa,__tla as sa}from"./useMessage-96878a4a.js";import{__tla as _a}from"./index-8106be8e.js";import{__tla as ca}from"./index-d17bd909.js";import{__tla as ua}from"./main-9a47ac8b.js";import{__tla as ia}from"./el-image-cae97e2e.js";import{__tla as na}from"./el-image-viewer-da1b6008.js";import{__tla as da}from"./main-06d64462.js";import{__tla as ma}from"./index-7a47d3d0.js";import{__tla as pa}from"./index-9ec51922.js";import{__tla as fa}from"./formatTime-7f0ec2bf.js";let k,ya=Promise.all([(()=>{try{return Y}catch{}})(),(()=>{try{return $}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return ca}catch{}})(),(()=>{try{return ua}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return pa}catch{}})(),(()=>{try{return fa}catch{}})()]).then(async()=>{let d,m,p;d={key:0,class:"select-item2"},m={class:"item-name"},p=(o=>(Q("data-v-17bdaa79"),o=o(),R(),o))(()=>g("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(q({__name:"TabVoice",props:{modelValue:{type:Object,required:!0}},emits:["update:modelValue"],setup(o,{emit:j}){const x=oa(),E={Authorization:"Bearer "+z()},A=o,C=j,e=B({get:()=>A.modelValue,set:t=>C("update:modelValue",t)}),s=V(!1),f=V([]),c=G({accountId:e.value.accountId,type:"voice",title:"",introduction:""}),M=t=>ea(la.Voice,10)(t),O=t=>{if(t.code!==0)return x.error("\u4E0A\u4F20\u51FA\u9519\uFF1A"+t.msg),!1;f.value=[],c.title="",c.introduction="",y(t.data)},P=()=>{e.value.mediaId=null,e.value.url=null,e.value.name=null},y=t=>{s.value=!1,e.value.mediaId=t.mediaId,e.value.url=t.url,e.value.name=t.name};return(t,_)=>{const u=W,v=D,i=F,T=K,h=L,U=N;return n(),w("div",null,[r(e).url?(n(),w("div",d,[g("p",m,H(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:P},{default:l(()=>[a(v,{icon:"ep:delete"})]),_:1})]),_:1})])):(n(),J(u,{key:1,style:{"text-align":"center"}},{default:l(()=>[a(h,{span:12,class:"col-select"},{default:l(()=>[a(i,{type:"success",onClick:_[0]||(_[0]=b=>s.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(s),"onUpdate:modelValue":_[1]||(_[1]=b=>S(s)?s.value=b: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(U,{action:"/dev-api/admin-api/mp/material/upload-temporary",headers:E,multiple:"",limit:1,"file-list":r(f),data:r(c),"before-upload":M,"on-success":O},{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","E:/GAOHP_2023/mall/newfeifan-front/yudao-ui-admin-vue3/src/views/mp/components/wx-reply/components/TabVoice.vue"]])});export{ya as __tla,k as default};
