<!-- 选择简历 -->
<template>
  <Dialog
    :visible="show"
    :widthType="2"
    titleClass="text-h6"
    :title="$t('resume.selectResumeToSubmit')"
    @close="emit('close')"
    @submit="emit('submit', selectResume)"
  >
    <v-radio-group v-model="selectResume">
      <v-radio v-for="val in list" :key="val.id" :value="val.id" :label="val.title" color="primary"></v-radio>
    </v-radio-group>
  </Dialog>
</template>

<script setup>
import Dialog from '@/components/CtDialog'
import { defineEmits, watch, computed, ref } from 'vue'
defineOptions({name: 'position-details-selectResumeDialog'})

const props = defineProps({
  list: {
    type: Array,
    default: () => []
  },
  modelValue: [Boolean, Number]
})
const emit = defineEmits(['update:modelValue', 'handleToUpload', 'submit', 'close'])
const show = computed(() => {
  return props.modelValue
})

watch(() => show.value, (newVal) => {
  emit('update:modelValue', newVal)
})

const selectResume = ref()
</script>
<style lang="scss" scoped>
</style>
