import{d as f,Q as h,U as p,j as e,B as c,C as I,aT as g,y as l}from"./ResizeObserver.es.62ab429c.js";import{C as U}from"./index.786e83cc.js";import{I as i}from"./index.021584f9.js";import{i as d}from"./icon_teacher.40b6f077.js";import{i as v}from"./icon_upload_poster.81da3a98.js";import{T as C}from"./index.1db64c88.js";import{i as _}from"./icon_video.f8e50d61.js";import{C as w}from"./index.4b0cb3c8.js";import"./index.a6e5e68b.js";/* empty css             */import"./tcplayer.v4.8.0.min.87d92d44.js";const S="_elegant_1o7v1_1",y="_line_1o7v1_6",B="_tedeoItem_1o7v1_9",N="_teCover_1o7v1_9",L="_itemBg_1o7v1_12",T="_iconVideo_1o7v1_33",V="_teSection_1o7v1_51",A="_teTitle_1o7v1_54",D="_info_1o7v1_59",b="_teUserInfo_1o7v1_64",F="_teUserLogo_1o7v1_71",k="_teUserName_1o7v1_78",x="_teUserNum_1o7v1_82",G="_videoGroup_1o7v1_86",P="_searchContainer_1o7v1_98",q="_item_1o7v1_12",$="_searchItem_1o7v1_107",H="_title_1o7v1_111",R="_content_1o7v1_119",j="_searchFollow_1o7v1_125",z="_active_1o7v1_129",M="_searchLive_1o7v1_133",Q="_active2_1o7v1_137",E="_searchDefault_1o7v1_141",J="_star_1o7v1_151",K="_video_1o7v1_86",O="_living_1o7v1_163",W="_animation_1o7v1_180";var o={elegant:S,line:y,tedeoItem:B,teCover:N,itemBg:L,iconVideo:T,teSection:V,teTitle:A,info:D,teUserInfo:b,teUserLogo:F,teUserName:k,teUserNum:x,videoGroup:G,searchContainer:P,item:q,searchItem:$,title:H,content:R,searchFollow:j,active:z,searchLive:M,active2:Q,searchDefault:E,star:J,video:K,living:O,animation:W},le=f({name:"teacher-style",setup(){const u=h(),s=p({videoStatus:!1,videoItem:{},isAddBrowse:!1,dataShow:!1,teacherId:u.query.teacherId,list:[],userInfo:{}});(async()=>{s.dataShow=!0;try{const{data:t}=await l.get("/api-student/teacher/queryTeacherHome",{params:{userId:s.teacherId}});s.userInfo=t,s.list=t.styleVideo||[],s.dataShow=s.list.length>0}catch{}})();const m=async()=>{try{if(!s.isAddBrowse)return;await l.get("/api-student/teacher/addVideoBrowse",{hideLoading:!0,params:{videoId:s.videoItem.id}}),s.isAddBrowse=!1}catch{}};return()=>e("div",{class:o["teacher-elegant"]},[e(C,null,{default:()=>[e(U,{border:!1,background:"#f6f8f9",isFixed:!1},null)]}),s.dataShow?e("div",{class:[o.elegant]},[e("div",{class:o.line},[s.list.map((t,n)=>{var a,r;return n%2===0&&e("div",{class:o.tedeoItem},[e("div",{class:o.itemBg,onClick:()=>{s.videoStatus=!0,s.isAddBrowse=!0,s.videoItem=t}},null),e("img",{class:o.iconVideo,src:_},null),e("div",{class:o.teCover},[e(i,{src:t.cover||v,fit:"cover"},null)]),e("div",{class:o.teSection},[e("div",{class:o.info},[e("div",{class:o.teUserInfo},[e(i,{src:((a=s.userInfo)==null?void 0:a.heardUrl)||d,class:o.teUserLogo},null),e("span",{class:[o.teUserName,"van-hairline--right van-ellipsis"]},[((r=s.userInfo)==null?void 0:r.username)||`\u6E38\u5BA2${(t==null?void 0:t.userId)||""}`])]),e("span",{class:o.teUserNum},[t.browse,c("\u6D4F\u89C8")])])])])})]),e("div",{class:o.line},[s.list.map((t,n)=>{var a,r;return n%2===1&&e("div",{class:o.tedeoItem},[e("div",{class:o.itemBg,onClick:()=>{s.videoStatus=!0,s.isAddBrowse=!0,s.videoItem=t}},null),e("img",{class:o.iconVideo,src:_},null),e("div",{class:o.teCover},[e(i,{src:t.cover||v,fit:"cover"},null)]),e("div",{class:o.teSection},[e("div",{class:o.info},[e("div",{class:o.teUserInfo},[e(i,{src:((a=s.userInfo)==null?void 0:a.heardUrl)||d,class:o.teUserLogo},null),e("span",{class:[o.teUserName,"van-hairline--right van-ellipsis"]},[((r=s.userInfo)==null?void 0:r.username)||`\u6E38\u5BA2${(t==null?void 0:t.userId)||""}`])]),e("span",{class:o.teUserNum},[t.browse,c("\u6D4F\u89C8")])])])])})])]):e(I,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u8001\u5E08\u98CE\u91C7"},null),e(g,{show:s.videoStatus,round:!0,class:o.videoGroup,closeable:!0,onClose:()=>{s.videoStatus=!1,s.isAddBrowse=!1}},{default:()=>{var t;return[s.videoStatus&&e(w,{playsinline:!0,onPlay:m,src:(t=s.videoItem)==null?void 0:t.videoUrl},null)]}})])}});export{le as default};
