import{_ as x}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{q as s,z as y,D as S,f as i,o as l,b as e,F as f,k as g,n as v,t as h,G as w}from"./app-B2Zwqohx.js";const k={class:"relative w-full max-w-3xl mx-auto overflow-hidden"},D=["src","alt"],j={class:"p-4 bg-white text-center"},C={class:"text-xl font-semibold"},z={class:"text-gray-600"},I={class:"flex justify-center mt-4"},M=["onClick"],B=3e3,A={__name:"Carousel",setup(F){const n=s([{image:"https://cdn.pixabay.com/photo/2021/09/12/18/07/robin-6619184_1280.jpg",title:"Slide 1",description:"Description for Slide 1",animation:"fade"},{image:"https://cdn.pixabay.com/photo/2022/12/13/17/55/robin-7653878_1280.jpg",title:"Slide 2",description:"Description for Slide 2",animation:"zoom"},{image:"https://cdn.pixabay.com/photo/2017/03/05/21/06/bird-2119874_1280.jpg",title:"Slide 3",description:"Description for Slide 3",animation:"rotate"},{image:"https://cdn.pixabay.com/photo/2016/11/19/14/52/bird-1839689_1280.jpg",title:"Slide 4",description:"Description for Slide 4",animation:"slide-up"},{image:"https://cdn.pixabay.com/photo/2015/06/22/22/41/robin-818126_1280.jpg",title:"Slide 5",description:"Description for Slide 5",animation:"slide-down"}]),o=s(0),r=s(null),c=()=>{o.value=(o.value+1)%n.value.length},_=()=>{o.value=(o.value-1+n.value.length)%n.value.length},b=p=>{o.value=p},d=()=>{r.value=setInterval(c,B)},u=()=>{clearInterval(r.value)};return y(d),S(u),(p,m)=>(l(),i("div",k,[e("div",{class:"flex transition-transform ease-in-out duration-500",style:w({transform:`translateX(-${o.value*100}%)`}),onMouseenter:u,onMouseleave:d},[(l(!0),i(f,null,g(n.value,(t,a)=>(l(),i("div",{key:a,class:v(["w-full flex-shrink-0",{"opacity-100":a===o.value,"animate-fade":t.animation==="fade","animate-zoom":t.animation==="zoom","animate-rotate":t.animation==="rotate","animate-slide-up":t.animation==="slide-up","animate-slide-down":t.animation==="slide-down"}])},[e("img",{src:t.image,alt:t.title,class:"w-full h-64 object-cover rounded-lg"},null,8,D),e("div",j,[e("h2",C,h(t.title),1),e("p",z,h(t.description),1),m[0]||(m[0]=e("button",{class:"mt-2 px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600"}," More Details ",-1))])],2))),128))],36),e("button",{class:"absolute top-1/2 left-2 transform -translate-y-1/2 bg-gray-800 text-white p-2 rounded-full",onClick:_},"‹"),e("button",{class:"absolute top-1/2 right-2 transform -translate-y-1/2 bg-gray-800 text-white p-2 rounded-full",onClick:c},"›"),e("div",I,[(l(!0),i(f,null,g(n.value,(t,a)=>(l(),i("span",{key:a,class:v(["w-3 h-3 mx-1 rounded-full cursor-pointer",a===o.value?"bg-blue-500":"bg-gray-300"]),onClick:$=>b(a)},null,10,M))),128))])]))}},G=x(A,[["__scopeId","data-v-49f8b703"]]);export{G as default};
