<template>
	<div class="activities-details-page page">
		<!---------------------------------- Section 1 ------------------------------------->
		<section class="s1-Img-BG">
			<div
				class="parallax"
				:style="{
					background: `linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),url(${cover ? cover : defaultCover})`
				}"
			>
				<h1 class="h1 anim-fadeIn" :style="{ color: $route.params.lang === 'fa' && '#fff' }">{{ content.s1.t1 }}</h1>
			</div>
		</section>

		<!---------------------------------- Section 2 ------------------------------------->
		<section class="s2-Img-BG">
			<div class="parallax">
				<div class="row">
					<div class="col-12 centerItem s2-item">
						<div class="s2-body">
							<div class="container anim-fadeInStagger">
								<div class="_s2-Desc-View">
									<div class="check">
										<i class="fas fa-check-circle"></i>
										<p>{{ content.s2.t1 }}</p>
									</div>
									<div class="check">
										<i class="fas fa-check-circle"></i>
										<p>{{ content.s2.t2 }}</p>
									</div>
									<div class="check">
										<i class="fas fa-check-circle"></i>
										<p>{{ content.s2.t3 }}</p>
									</div>
									<div class="check">
										<i class="fas fa-check-circle"></i>
										<p>{{ content.s2.t4 }}</p>
									</div>
									<div class="check">
										<i class="fas fa-check-circle"></i>
										<p>{{ content.s2.t5 }}</p>
									</div>
									<div class="check">
										<i class="fas fa-check-circle"></i>
										<p>{{ content.s2.t6 }}</p>
									</div>
									<div class="check">
										<i class="fas fa-check-circle"></i>
										<p>{{ content.s2.t7 }}</p>
									</div>
									<div class="check">
										<i class="fas fa-check-circle"></i>
										<p>{{ content.s2.t8 }}</p>
									</div>
									<div class="check">
										<i class="fas fa-check-circle"></i>
										<p>{{ content.s2.t9 }}</p>
									</div>
									<div class="check">
										<i class="fas fa-check-circle"></i>
										<p>{{ content.s2.t10 }}</p>
									</div>
									<div class="check">
										<i class="fas fa-check-circle"></i>
										<p>{{ content.s2.t11 }}</p>
									</div>
									<div class="check">
										<i class="fas fa-check-circle"></i>
										<p>{{ content.s2.t12 }}</p>
									</div>
									<div class="check">
										<i class="fas fa-check-circle"></i>
										<p>{{ content.s2.t13 }}</p>
									</div>
									<div class="check">
										<i class="fas fa-check-circle"></i>
										<p>{{ content.s2.t14 }}</p>
									</div>
									<div class="check">
										<i class="fas fa-check-circle"></i>
										<p>{{ content.s2.t15 }}</p>
									</div>
									<div class="check">
										<i class="fas fa-check-circle"></i>
										<p>{{ content.s2.t16 }}</p>
									</div>
									<div class="check">
										<i class="fas fa-check-circle"></i>
										<p>{{ content.s2.t17 }}</p>
									</div>
									<div class="check">
										<i class="fas fa-check-circle"></i>
										<p>{{ content.s2.t18 }}</p>
									</div>
								</div>

								<a class="btn btn-primary" href="./../../../static/SRP.pdf" download="">دانلود pdf</a>
							</div>
						</div>
					</div>
				</div>
			</div>
		</section>
	</div>
</template>

<script>
	import {
		fadeInAnimation,
		fadeInStaggerAnimation,
		leftToRightAnimation,
		leftToRightStaggerAnimation,
		numberAnimation,
		progressAnimation
	} from '@/utils/animations'

	export default {
		data() {
			return {
				defaultCover: '/img/ActivitiesPage/page-title.png'
			}
		},
		mounted() {
			this.$nextTick(() => {
				fadeInAnimation(this.$gsap)
				leftToRightAnimation(this.$gsap)
				fadeInStaggerAnimation(this.$gsap)
				leftToRightStaggerAnimation(this.$gsap)
				numberAnimation(this.$gsap)
				progressAnimation(this.$gsap)
				//--------------------------------------------------------- Section 1
				this.$gsap
					.timeline({
						scrollTrigger: {
							trigger: '.s2-Img-BG',
							scrub: true,
							start: 'top top'
						}
					})
					.to($('.s1-Img-BG .parallax'), {
						duration: 9,
						opacity: 0,
						y: '50%'
					})
			})
		},
		methods: {
			goDown(element) {
				this.$gsap.to(window, { scrollTo: element, duration: 0.7 })
			}
		},
		computed: {
			content() {
				return this.$store.state.content.srpConex[this.$route.params.lang]
			},
			cover() {
				return this.$store.state.global.cover?.activity
			}
		}
	}
</script>
