<template>
	<view>
		<klp-header @lineChange="setActive"></klp-header>
		
		<view class="">
			<Acidity v-if="active == 0"/>
			<Paint v-else-if="active == 1"/>
			<Zinc1 v-else-if="active == 2"></Zinc1>
			<Zinc2 v-else-if="active == 3"></Zinc2>
			<Zinc3 v-else-if="active == 4"></Zinc3>
		</view>
	</view>
</template>

<script>
	import Acidity from '@/components/lines/acidity.vue'
	import Paint from '@/components/lines/paint.vue'
	import Zinc1 from '@/components/lines/zinc1.vue'
	import Zinc2 from '@/components/lines/zinc2.vue'
	import Zinc3 from '@/components/lines/zinc3.vue'
	
	export default {
		components: {
			Acidity,
			Paint,
			Zinc1,
			Zinc2,
			Zinc3
		},
		data() {
			return {
				active: 0
			}
		},
		methods: {
			next() {
				if (this.active >= 5) {
					this.active = 0
				} else {
					this.active += 1
				}
			},
			setActive({ index, line }) {
				this.active = index;
			}
		}
	}
</script>