<template>
  <view class="version-option-list">
    <VersionOptionCard
      v-for="option in options"
      :key="option.templateItemId"
      :option="option"
      :selected="option.templateItemId === selectedValue"
      @select="emit('select', $event)"
    />
  </view>
</template>

<script setup>
import VersionOptionCard from "../VersionOptionCard/index.vue";

defineProps({
  options: {
    type: Array,
    default: () => [],
  },
  selectedValue: {
    type: String,
    default: "",
  },
});

const emit = defineEmits(["select"]);
</script>

<style scoped lang="scss">
@import "./styles/index.scss";
</style>
