import{u as e}from"./vendor-DHdPOO28.js";import{_ as a}from"./vendor-TgWiOutC.js";import{ag as t,a4 as l,a3 as s,v as o,a5 as i,K as n,b1 as c,a2 as r,aW as u,c as d,aL as v,bf as p,aN as x,ad as f}from"./vendor-BXdGExd0.js";import{c as m,L as g,g as y}from"./souav-BTAG2baT.js";import{s as k}from"./vendor-CB_mu4eO.js";const _={key:0,class:"pt-[23px]"},C={class:"px-4 grid grid-cols-2 gap-x-2 gap-y-2.5"},b=t({__name:"MayLikeView",setup(t){const d=e();return(e,t)=>o(d).mayLikeList.length>0?(u(),l("div",_,[t[0]||(t[0]=i("div",{class:"px-4 mb-4"},[i("h2",{class:"text-[16px] text-white font-bold"},"为你推荐")],-1)),i("div",C,[(u(!0),l(n,null,c(o(d).mayLikeList,e=>(u(),r(a,{key:e.contentId,model:e},null,8,["model"]))),128))])])):s("",!0)}}),L={key:0,class:"flex items-center w-full"},w=["onClick"],h=t({__name:"VideoOpView",setup(a){const t=e(),{isLike:r,detailModel:f,isCai:_,isCollect:C,videoTitle:b,videoId:h}=k(t),V=d(()=>{var e,a;return[{iconClass:r.value?"icon-zan_a":"icon-zan_n",text:m.formatNumberK((null==(e=f.value)?void 0:e.likeNum)??0),textColor:"#ffffff",action:()=>t.updateLikeState(r.value?g.none:g.like,!0)},{iconClass:_.value?"icon-cai_a":"icon-cai_n",text:m.formatNumberK((null==(a=f.value)?void 0:a.unLikeNum)??0),textColor:"#808080",action:()=>t.updateLikeState(_.value?g.none:g.cai,!1)},{iconClass:C.value?"icon-star_a":"icon-star_n",text:C.value?"已收藏":"收藏",textColor:"#ffffff",action:()=>t.toggleCollect()},{iconClass:"icon-share1",text:"分享",textColor:"#ffffff",action:()=>{y(`${b.value}\n${location.protocol}//${location.host}/video/${h.value}`,"")}}]});return(e,a)=>o(f)?(u(),l("div",L,[(u(!0),l(n,null,c(o(V),e=>(u(),l("div",{key:e.text,class:"flex-1 flex flex-col items-center justify-center gap-y-2 cursor-pointer",onClick:e.action},[i("i",{class:v(["icon-sprite",e.iconClass])},null,2),i("span",{style:x({color:e.textColor}),class:"text-xs h-3"},p(e.text),5)],8,w))),128))])):s("",!0)}}),V={class:"bg-gray-900 px-[10px] pb-[5px]"},j={class:"flex flex-col gap-y-5"},N={class:"text-[15px] font-medium text-white line-clamp-2 my-2"},M={class:"flex flex-wrap items-center gap-2.5 pt-[15px]"},$={class:"px-2.5 py-0.5 rounded-[5px] bg-gray-600/70"},I={class:"text-xs text-white"},K={class:"text-xs text-white"},z=t({__name:"VideoBaseInfoView",setup(a){const t=e(),{videoModel:s,detailModel:r,videoTitle:v}=k(t),x=d(()=>{var e,a;const t=(null==(e=s.value)?void 0:e.tags)||(null==(a=r.value)?void 0:a.tags);return t?t.split(","):[]}),m=d(()=>{var e,a;return(null==(e=s.value)?void 0:e.score)||(null==(a=r.value)?void 0:a.score)});return(e,a)=>(u(),l("div",V,[i("div",j,[i("p",N,p(o(v)),1),f(h),i("div",M,[i("div",$,[i("span",I,p(m.value??0)+"分",1)]),(u(!0),l(n,null,c(x.value,(e,a)=>(u(),l("div",{key:a,class:"px-2.5 py-0.5 rounded-[5px] bg-gray-600/70"},[i("span",K,p(e),1)]))),128))])])]))}}),S=t({__name:"VideoDetailView",setup:e=>(e,a)=>(u(),l("div",null,[f(z),f(b)]))});export{S as _};
