"use strict";var f=Object.defineProperty,p=Object.defineProperties;var g=Object.getOwnPropertyDescriptors;var u=Object.getOwnPropertySymbols;var _=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var d=(e,o,a)=>o in e?f(e,o,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[o]=a,c=(e,o)=>{for(var a in o||(o={}))_.call(o,a)&&d(e,a,o[a]);if(u)for(var a of u(o))E.call(o,a)&&d(e,a,o[a]);return e},m=(e,o)=>p(e,g(o));var s=require("../../../../../../common/vendor.js"),l=require("../../../../../../common/assets.js");const n=s.index.createInnerAudioContext(),y=s.defineComponent({props:{data:{type:Object,default:()=>({})},messageData:{type:Object,default:()=>({})}},setup(e,o){const a=s.reactive({data:{},message:{},isPlay:!1});s.watchEffect(()=>{a.data=e.data,a.message=e.messageData}),s.onMounted(()=>{n.onPlay(()=>{console.log("\u5F00\u59CB\u64AD\u653E")}),n.onEnded(()=>{console.log("\u505C\u6B62\u64AD\u653E")}),n.onError(r=>{console.error(r,"onError")})});const t=()=>{a.data.url&&(n.src=a.data.url,n.play()),a.isPlay=!0};return m(c({},s.toRefs(a)),{audio:n,handlePlay:t})}}),v=y;function C(e,o,a,t,r,h){return s.e({a:e.message.flow==="in"},e.message.flow==="in"?{b:l._imports_0$5}:{},{c:s.t(e.data.second),d:e.message.flow==="out"},e.message.flow==="out"?{e:l._imports_0$5}:{},{f:s.n("content content-"+e.message.flow),g:s.o((...i)=>e.handlePlay&&e.handlePlay(...i))})}var P=s._export_sfc(v,[["render",C],["__scopeId","data-v-33bc0b66"],["__file","E:/Project/2023/\u95EE\u8BCA\u5E73\u53F0/his_user_miniapp/pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-audio.vue"]]);wx.createComponent(P);
