import"./rolldown-runtime-BM3Ffeng.js";import{mt as e}from"./element-plus-vendor-BF9PNysW.js";import{A as t,D as n,E as r,I as i,O as a,P as o,Tt as s,Xt as c,et as l,g as u,gt as d,ht as f,k as p,nt as m,qt as h,x as g}from"./vue-vendor-DMUmTARL.js";import{hi as _,mi as v,vi as y}from"./icons-vendor-Db5MGAkr.js";import{t as b}from"./_plugin-vue_export-helper-CWyGVBf-.js";var x={class:`flex h-full min-h-0 flex-col border-l border-white/10 bg-black`},S={class:`flex shrink-0 items-center justify-between border-b border-white/[0.08] px-4 py-3`},C={class:`min-w-0 flex-1`},w={class:`truncate text-sm font-medium text-white/90`},T={class:`mt-0.5 text-xs text-white/40`},E={key:0,class:`shrink-0 px-4 py-3`},D={class:`sidebar-scroll zf-scrollbar min-h-0 flex-1 overflow-y-auto px-3 pb-3`},O={key:0,class:`space-y-1`},k=[`onClick`],A={class:`min-w-0 flex-1 truncate text-sm`},j={class:`flex shrink-0 items-center gap-1`},M={key:0,class:`rounded bg-blue-400/15 px-1.5 py-0.5 text-xs text-blue-300`},N={key:1,class:`rounded bg-purple-400/15 px-1.5 py-0.5 text-xs text-purple-300`},P={key:0,class:`py-8 text-center text-sm text-white/30`},F={key:1,class:`flex flex-col items-center justify-center py-12 text-center`},I=b(i({__name:`VideoPlaylistSidebar`,props:{currentVideoName:{},videoList:{},hasSubtitle:{type:Function},hasDanmuku:{type:Function}},emits:[`select-video`,`close`],setup(i,{emit:b}){let I=i,L=b,R=s(``),z=r(()=>{if(!R.value)return I.videoList;let e=R.value.toLowerCase();return I.videoList.filter(t=>t.name.toLowerCase().includes(e))});return(r,s)=>{let b=y,I=e,B=v,V=_;return l(),t(`div`,x,[n(`div`,S,[n(`div`,C,[n(`h3`,w,c(i.currentVideoName),1),n(`p`,T,c(i.videoList.length)+` 个视频`,1)]),n(`button`,{class:`ml-3 flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-white/60 transition-colors hover:bg-white/[0.12] hover:text-white`,onClick:s[0]||=e=>L(`close`)},[o(I,{class:`text-base`},{default:f(()=>[o(b)]),_:1})])]),i.videoList.length>1?(l(),t(`div`,E,[d(n(`input`,{"onUpdate:modelValue":s[1]||=e=>R.value=e,class:`w-full rounded-lg border border-white/[0.08] bg-white/[0.06] px-3 py-2 text-sm text-white/80 placeholder:text-white/30 focus:border-blue-400/40 focus:bg-white/[0.1] focus:outline-none`,placeholder:`搜索视频...`},null,512),[[u,R.value]])])):p(``,!0),n(`div`,D,[i.videoList.length>1?(l(),t(`div`,O,[(l(!0),t(g,null,m(z.value,e=>(l(),t(`button`,{key:e.name,class:h([`flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-left transition-colors`,e.name===i.currentVideoName?`bg-white/[0.12] font-medium text-white`:`text-white/60 hover:bg-white/[0.06] hover:text-white/80`]),onClick:t=>L(`select-video`,e)},[o(I,{class:h([`shrink-0 text-base`,e.name===i.currentVideoName?`text-blue-400`:`text-white/30`])},{default:f(()=>[e.name===i.currentVideoName?(l(),a(B,{key:0})):(l(),a(V,{key:1}))]),_:2},1032,[`class`]),n(`span`,A,c(e.name),1),n(`div`,j,[i.hasSubtitle(e.name)?(l(),t(`span`,M,`字幕`)):p(``,!0),i.hasDanmuku(e.name)?(l(),t(`span`,N,`弹幕`)):p(``,!0)])],10,k))),128)),z.value.length===0?(l(),t(`div`,P,` 未找到相关视频 `)):p(``,!0)])):(l(),t(`div`,F,[o(I,{class:`mb-2 text-3xl text-white/20`},{default:f(()=>[o(V)]),_:1}),s[2]||=n(`p`,{class:`text-sm text-white/30`},`当前目录仅有一个视频`,-1)]))])])}}}),[[`__scopeId`,`data-v-71411421`]]);export{I as default};