/* empty css                                                              */import{_ as S,r as f,b as B,c as u,d as i,w as l,e as v,o as s,f as a,t as m,F as g,g as _,h as r,E as d}from"./index-DikBC4WP.js";const E={class:"call-wrapper"},F={class:"avatar-section"},U=["src"],T={class:"user-name"},D={class:"status-text"},I={class:"control-section"},M={__name:"index",props:{mode:{type:String,default:"call"},avatarUrl:{type:String,default:"https://cdn-icons-png.flaticon.com/512/1946/1946429.png"},userName:{type:String,default:"对方用户"}},setup(o,{expose:y}){const k=o,n=f(!1),t=f("calling"),b=B(()=>k.mode==="call"?t.value==="calling"?"正在呼叫对方...":t.value==="active"?"通话中":"通话结束":t.value==="active"?"通话中":"对方来电...");function x(){t.value="active",d.success("开始通话")}function C(){t.value="active",d.success("已接听")}function p(){t.value="ended",d.error("通话已结束")}function h(){n.value=!1}function V(){n.value=!0}return y({show:V}),(j,e)=>{const c=v("el-button"),w=v("el-dialog");return s(),u("div",null,[i(w,{modelValue:n.value,"onUpdate:modelValue":e[0]||(e[0]=N=>n.value=N),width:"80%","show-close":!1,"destroy-on-close":!0,modal:!1,"lock-scroll":!0,"before-close":h,class:"call-dialog"},{default:l(()=>[a("div",E,[a("div",F,[a("img",{class:"avatar",src:o.avatarUrl,alt:"头像"},null,8,U),a("div",T,m(o.userName),1),a("div",D,m(b.value),1)]),a("div",I,[o.mode==="call"?(s(),u(g,{key:0},[t.value==="calling"?(s(),_(c,{key:0,type:"danger",round:"",class:"control-btn hangup",onClick:p},{default:l(()=>[...e[1]||(e[1]=[r(" 挂断 ",-1)])]),_:1})):(s(),_(c,{key:1,type:"primary",round:"",class:"control-btn call",onClick:x},{default:l(()=>[...e[2]||(e[2]=[r(" 呼叫中... ",-1)])]),_:1}))],64)):(s(),u(g,{key:1},[i(c,{type:"success",round:"",class:"control-btn accept",onClick:C},{default:l(()=>[...e[3]||(e[3]=[r(" 接听 ",-1)])]),_:1}),i(c,{type:"danger",round:"",class:"control-btn hangup",onClick:p},{default:l(()=>[...e[4]||(e[4]=[r(" 挂断 ",-1)])]),_:1})],64))])])]),_:1},8,["modelValue"])])}}},A=S(M,[["__scopeId","data-v-6baeba6a"]]);export{A as default};
