import{S as a,b as e,j as s}from"./vendor-BJZ6tUoe.js";import{_ as t}from"./vendor-BiIH8PfR.js";import{ag as o,r as i,w as l,a2 as n,bH as r,a4 as d,b1 as p,a5 as c,ad as u,a3 as v,K as m,aW as f}from"./vendor-BXdGExd0.js";import{_ as h}from"./vendor-BCo6x5W8.js";const x={class:"relative w-full h-full"},b={key:0,class:"absolute bottom-[40px] left-0 w-full flex justify-center z-10 pointer-events-none pb-safe"},g=h(o({__name:"GenericDramaSwiper",props:{list:{},initialIndex:{},hasMore:{type:Boolean}},emits:["ppw-close","page-change","load-more"],setup(o,{emit:h}){const g=o,w=h,_=i(g.initialIndex||0),j=a=>{const e=g.hasMore??!1;return a===g.list.length-1&&!e},y=a=>{_.value=a;const e=g.list[a];w("page-change",a,e),g.hasMore&&a>=g.list.length-2&&w("load-more"),j(a)&&s({message:"没有更多视频了",position:"bottom"})};return l(()=>g.initialIndex,a=>{void 0!==a&&(_.value=a)}),(s,i)=>{var l;const h=e,g=a;return f(),n(g,{key:null==(l=o.list[0])?void 0:l.contentId,vertical:"",class:"h-[100dvh] w-full","show-indicators":!1,"lazy-render":!0,loop:!1,onChange:y,"initial-swipe":o.initialIndex,touchable:!0,"stop-propagation":!1},{default:r(()=>[(f(!0),d(m,null,p(o.list,(a,e)=>(f(),n(h,{key:a.contentId||e},{default:r(()=>[c("div",x,[u(t,{video:a,index:e,"is-active":e===_.value},null,8,["video","index","is-active"]),j(e)?(f(),d("div",b,[...i[0]||(i[0]=[c("span",{class:"text-[12px] text-white/60 bg-black/30 px-3 py-1 rounded-full backdrop-blur-sm shadow-sm"}," - 已经到底啦 - ",-1)])])):v("",!0)])]),_:2},1024))),128))]),_:1},8,["initial-swipe"])}}}),[["__scopeId","data-v-caf5e3ac"]]);export{g as G};
