import{_ as e,r as a,a2 as l,ad as o,d as t,o as u,c as r,l as n,k as s,f as c,J as i,m as v,e as h,w as d,O as g}from"./index.e5c8b0d6.js";const f={class:"LeftBox"},m={class:"RightBox"},p=e({__name:"TimeLine2",props:{bgcolor:{type:String,default:"dark"},nowValue:{type:String,default:""},yearArr:{type:Array,default:()=>[]},second:{type:Number,default:1e3}},emits:["handleNowValueChange"],setup(e,{emit:p}){const w=e;let y=null,k=a(5),V=a(1),b=a(0),C=a(0),x=a(100);const A=a({});let _=a(!1),N=a([]);const L=e=>{switch(e){case 0:p("handleNowValueChange",N.value[0]);break;case 25:p("handleNowValueChange",N.value[1]);break;case 50:p("handleNowValueChange",N.value[2]);break;case 75:p("handleNowValueChange",N.value[3]);break;case 100:p("handleNowValueChange",N.value[4])}},z=()=>{_.value=!_.value},I=()=>{V.value>1&&(V.value--,b.value=0,N.value=Array.from(w.yearArr).slice((V.value-1)*k.value,V.value*k.value),p("handleNowValueChange",N.value[0]))},M=()=>{V.valuew.yearArr),((e,a)=>{N.value=Array.from(e).slice((V.value-1)*k.value,V.value*k.value)})),l(N,((e,a)=>{let l={};N.value.forEach(((e,a)=>{l[25*a]=e})),A.value=l,x.value=25*(N.value.length-1)}),{deep:!0}),l(_,((e,a)=>{e?y=setInterval((()=>{b.value{})),(e,a)=>{const l=t("el-slider"),o=t("DArrowLeft"),p=t("el-icon"),y=t("el-tooltip"),k=t("VideoPause"),V=t("VideoPlay"),N=t("DArrowRight");return u(),r("div",{class:g("light"==w.bgcolor?"TimeLine2-light":"TimeLine2-dark")},[n("div",f,[w.yearArr.length?(u(),s(l,{key:0,modelValue:c(b),"onUpdate:modelValue":a[0]||(a[0]=e=>i(b)?b.value=e:b=e),step:25,"show-stops":"","show-tooltip":!1,min:c(C),max:c(x),marks:A.value,onChange:L},null,8,["modelValue","min","max","marks"])):v("",!0)]),n("div",m,[h(y,{class:"box-item",effect:"light",content:"上一页",placement:"top"},{default:d((()=>[h(p,{color:"light"==w.bgcolor?"#4a0987":"white",size:"30px",onClick:I},{default:d((()=>[h(o)])),_:1},8,["color"])])),_:1}),h(y,{class:"box-item",effect:"light",content:"播放/暂停",placement:"top"},{default:d((()=>[c(_)?(u(),s(p,{key:0,color:"light"==w.bgcolor?"#4a0987":"white",size:"30px",onClick:z},{default:d((()=>[h(k)])),_:1},8,["color"])):v("",!0),c(_)?v("",!0):(u(),s(p,{key:1,color:"light"==w.bgcolor?"#4a0987":"white",size:"30px",onClick:z},{default:d((()=>[h(V)])),_:1},8,["color"]))])),_:1}),h(y,{class:"box-item",effect:"light",content:"下一页",placement:"top"},{default:d((()=>[h(p,{color:"light"==w.bgcolor?"#4a0987":"white",size:"30px",onClick:M},{default:d((()=>[h(N)])),_:1},8,["color"])])),_:1})])],2)}}},[["__scopeId","data-v-4a4c3008"]]);export{p as default};