import{d as G,c_ as L,e as N,r as V,x as S,o as m,c as b,a as r,C as k,G as T,f as a,B as l,A as $,E as w,a2 as O,L as P,_ as W,K as q,a$ as D,I as F,bi as H,M as J,N as Q,__tla as R}from"./index-92ad187a.js";import{W as X,__tla as Y}from"./main-192bcefe.js";import Z,{__tla as aa}from"./main-fb68aec4.js";import{u as ta,U as ea,__tla as la}from"./useUpload-49196ae4.js";import{u as ra,__tla as _a}from"./useMessage-d9788660.js";import{_ as sa}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as oa}from"./index.vue_vue_type_script_setup_true_lang-6fbe4cc3.js";import{__tla as ca}from"./index-10cdad38.js";import{__tla as ua}from"./main-24b996ca.js";import{__tla as ia}from"./el-image-ee9e09ec.js";import{__tla as ma}from"./el-image-viewer-d472c5a2.js";import{__tla as na}from"./main.vue_vue_type_script_setup_true_lang-a8330ef1.js";import{__tla as da}from"./index-02010078.js";import{__tla as pa}from"./index-39aea9f6.js";import{__tla as fa}from"./formatTime-c7f253d6.js";let g,ya=Promise.all([(()=>{try{return R}catch{}})(),(()=>{try{return Y}catch{}})(),(()=>{try{return aa}catch{}})(),(()=>{try{return la}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return ca}catch{}})(),(()=>{try{return ua}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return pa}catch{}})(),(()=>{try{return fa}catch{}})()]).then(async()=>{let n,d,p;n={key:0,class:"select-item2"},d={class:"item-name"},p=(_=>(J("data-v-782ce0e7"),_=_(),Q(),_))(()=>k("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)),g=sa(G({__name:"TabVoice",props:{modelValue:{}},emits:["update:modelValue"],setup(_,{emit:x}){const C=ra(),M={Authorization:"Bearer "+L()},U=_,j=x,e=N({get:()=>U.modelValue,set:t=>j("update:modelValue",t)}),s=V(!1),f=V([]),c=S({accountId:e.value.accountId,type:"voice",title:"",introduction:""}),A=t=>ta(ea.Voice,10)(t),B=t=>{if(t.code!==0)return C.error("\u4E0A\u4F20\u51FA\u9519\uFF1A"+t.msg),!1;f.value=[],c.title="",c.introduction="",y(t.data)},K=()=>{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,o)=>{const u=P,v=W,i=q,z=D,h=F,E=H;return m(),b("div",null,[r(e).url?(m(),b("div",n,[k("p",d,T(r(e).name),1),a(u,{class:"ope-row",justify:"center"},{default:l(()=>[a(r(Z),{url:r(e).url},null,8,["url"])]),_:1}),a(u,{class:"ope-row",justify:"center"},{default:l(()=>[a(i,{type:"danger",circle:"",onClick:K},{default:l(()=>[a(v,{icon:"ep:delete"})]),_:1})]),_:1})])):(m(),$(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]=I=>s.value=!0)},{default:l(()=>[w(" \u7D20\u6750\u5E93\u9009\u62E9"),a(v,{icon:"ep:circle-check"})]),_:1}),a(z,{title:"\u9009\u62E9\u8BED\u97F3",modelValue:r(s),"onUpdate:modelValue":o[1]||(o[1]=I=>O(s)?s.value=I:null),width:"90%","append-to-body":"","destroy-on-close":""},{default:l(()=>[a(r(X),{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(E,{action:"/dev-api/admin-api/mp/material/upload-temporary",headers:M,multiple:"",limit:1,"file-list":r(f),data:r(c),"before-upload":A,"on-success":B},{tip:l(()=>[p]),default:l(()=>[a(i,{type:"primary"},{default:l(()=>[w("\u70B9\u51FB\u4E0A\u4F20")]),_:1})]),_:1},8,["file-list","data"])]),_:1})]),_:1}))])}}}),[["__scopeId","data-v-782ce0e7"]])});export{ya as __tla,g as default};
