import{d as a,j as e,B as o,C as l,y as c,aT as n}from"./ResizeObserver.es.62ab429c.js";import{C as d}from"./index.4b0cb3c8.js";const _="_stepSection_1h5ai_43",p="_stepTitle_1h5ai_43",r="_stepTitleNum_1h5ai_50",u="_active_1h5ai_54",v="_stepTitleText_1h5ai_57",h="_stepContent_1h5ai_62",T="_state0_1h5ai_68",S="_state1_1h5ai_69",m="_state2_1h5ai_70",f="_videoText_1h5ai_82",C="_videoImg_1h5ai_93",y="_videoStop_1h5ai_105",I="_videoList_1h5ai_115",x="_videoTitle_1h5ai_118",L="_videoSection_1h5ai_134",V="_videoItem_1h5ai_144";var s={"col-steps":"_col-steps_1h5ai_1","col-step":"_col-step_1h5ai_1","col-step__line":"_col-step__line_1h5ai_16","col-step_circle":"_col-step_circle_1h5ai_19",stepSection:_,stepTitle:p,stepTitleNum:r,active:u,stepTitleText:v,stepContent:h,state0:T,state1:S,state2:m,videoText:f,videoImg:C,videoStop:y,videoList:I,videoTitle:x,videoSection:L,videoItem:V},g="./assets/video_default.c4e3ec21.png",B=a({name:"VideoList",props:{list:{type:Array,default:[]}},render(){return e("div",{class:s.videoList},[e("div",{class:s.videoTitle},[e("i",null,null),o("\u89C6\u9891\u5217\u8868")]),this.list.length>0?e("div",{class:s.videoSection},[this.list.map((t,i)=>e("div",{class:s.videoItem},[e(d,{poster:g,src:t.url,preload:"none",height:"162px",currentTime:!1},null),e("p",null,[t.startTime])]))]):e(l,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u89C6\u9891"},null)])}});const N=t=>{if(t==0)return"\u672A\u5F00\u59CB";if(t==1)return"\u8FDB\u884C\u4E2D";if(t==2)return"\u5DF2\u7ED3\u675F"};var P=a({name:"CoursePlanStep",props:{courseId:{type:Number,default:0},showState:{type:Boolean,default:!1},hideVideo:{type:Boolean,default:!1},courseInfo:{type:Array,default:[]}},data(){return{videoStatus:!1,list:[]}},methods:{async onLookVideo(t){try{const i=await c.get("/api-student/liveRoomVideo/queryVideo",{params:{roomUid:t.roomUid}});console.log(i),this.list=i.data||[],this.videoStatus=!0}catch{}}},render(){return e("div",{class:s["col-steps"]},[e("div",{class:s["col-steps__items"]},[this.courseInfo.map((t,i)=>e("div",{class:s["col-step"]},[e("div",{class:s["col-step__title"]},[this.$slots.content?this.$slots.content():e("div",{class:s.stepSection},[e("div",{class:s.stepTitle},[e("span",{class:[s.stepTitleNum,(this.courseId===0||this.courseId===t.id)&&s.active]},[o("\u7B2C "),i+1,o(" \u8BFE\u65F6")]),this.showState&&e("span",{class:s[`state${t.liveState}`]},[N(t.liveState)])]),e("div",{class:s.stepContent},[e("span",{class:s.stepTitleText},[t.courseTime]),e("p",null,[t.coursePlan]),t.liveState===2&&!this.hideVideo&&e("div",{class:s.videoText,onClick:()=>{this.onLookVideo(t)}},[o("\u67E5\u770B\u56DE\u653E")])])])]),e("div",{class:s["col-step_circle"]},[i+1]),e("div",{class:s["col-step__line"]},null)]))]),e(n,{show:this.videoStatus,"onUpdate:show":t=>this.videoStatus=t,closeable:!0,round:!0,style:{width:"90%"}},{default:()=>[this.videoStatus&&e(B,{list:this.list},null)]})])}});export{P as C};
