<template>
	<view class="rules">
		<view class="rules-item" v-for="(item, index) in list" :key="index">
			<view class="rules-item-title">
				<theme-image src="@/static/promo/rz.png" class="rules-item-title-icon"></theme-image>
				<text class="rules-item-title-text" :style="{ color: themeStore.rule.titleColor }">{{ item.title }}</text>
			</view>
			<view class="rules-item-text" :style="{ color: themeStore.rule.textColor }" v-for="(text, index) in item.texts">{{ text }}</view>
		</view>
	</view>
</template>

<script setup>
import { useThemeStore } from '@/store/useThemeStore';
const themeStore = useThemeStore().theme.promo;
const props = defineProps({
	list: Array,
	color: String
});
</script>

<style lang="scss" scoped>
.rules {
	width: 100%;
	box-sizing: border-box;
	padding: 30rpx 8rpx;
	.rules-item {
		width: 100%;
		margin-bottom: 45rpx;
		.rules-item-title {
			width: 100%;
			height: 32rpx;
			display: flex;
			justify-content: flex-start;
			align-items: center;
			.rules-item-title-icon {
				width: 32rpx;
				height: 32rpx;
				margin-right: 15rpx;
			}
			.rules-item-title-text {
				font-size: 24rpx;
				color: #f8eb59;
			}
		}
		.rules-item-text {
			font-size: 24rpx;
			margin-top: 34rpx;
		}
	}
}
</style>
