<script setup>
import {ref} from "vue";

const props = defineProps({
  set: {
    type: Boolean
  }}
)

const allowComment = ref(props.set || null);

const emit = defineEmits(['selected']);

const sendMessage = () => {
  emit('selected', allowComment);
};
</script>

<template>
  <el-container>
    <div class="title">是否允许评论？</div>
    <el-radio-group v-model="allowComment" class="ml-4" @change="sendMessage">
      <el-radio :label="true" size="large">是</el-radio>
      <el-radio :label="false" size="large">否</el-radio>
    </el-radio-group>
  </el-container>
</template>

<style scoped>
.el-container {
  flex-direction: column;
  gap: 20px;
}
.title {
  font-size: 30px;
}
</style>