<template>
  <view class="register-type-page">
    <view class="type-list">
      <view class="type-item" @click="goToRegister('single')">
        <view class="type-label">单人赛</view>
        <view class="type-btn">去报名</view>
      </view>
      <view class="type-item" @click="goToRegister('team')">
        <view class="type-label">集体赛</view>
        <view class="type-btn">去报名</view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      eventId: ''
    };
  },
  onLoad(options) {
    if (options.id) {
      this.eventId = options.id;
    }
  },
  methods: {
    goToRegister(type) {
      uni.navigateTo({
        url: `/pages/select-event/select-event?eventId=${this.eventId}&type=${type}`
      });
    }
  }
};
</script>

<style lang="scss" scoped>
.register-type-page {
  min-height: 100vh;
  background-color: #f5f5f5;
  padding: 30rpx;
}

.type-list {
  display: flex;
  flex-direction: column;
  gap: 30rpx;
}

.type-item {
  background-color: #fff;
  border-radius: 16rpx;
  padding: 50rpx 40rpx;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.type-label {
  font-size: 36rpx;
  font-weight: bold;
  color: #333333;
}

.type-btn {
  background-color: #C93639;
  color: #fff;
  padding: 20rpx 60rpx;
  border-radius: 50rpx;
  font-size: 28rpx;
}
</style>
