<template>
  <div>
    <el-form :model="property" label-width="72px" label-position="left">
      <SerailNumber :property="property" />
      <el-form-item label="不确定">
        <el-radio-group v-model="property.is_view_incertitude">
          <el-radio v-for="{ value, label } in switchOption" :key="value" :label="value" :value="value">
            {{ label }}
          </el-radio>
        </el-radio-group>
      </el-form-item>

      <el-form-item label="拼音">
        <el-switch v-model="property.view_pinyin" active-value="true" inactive-value="false" />
      </el-form-item>
      <el-form-item v-show="isEnable(property.view_pinyin)" label="拼音位置">
        <el-radio
          v-for="{ value, label } in pinyinPositionList"
          :key="value"
          v-model="property.pinyin_position"
          :label="value"
          :disabled="!isEnable(property.view_pinyin)"
        >
          {{ label }}
        </el-radio>
      </el-form-item>
      <el-form-item v-show="isEnable(property.view_pinyin)" label="">
        <el-checkbox
          v-model="property.is_first_sentence_first_hz_pinyin_first_char_upper_case"
          :disabled="!isEnable(property.view_pinyin)"
          true-label="true"
          false-label="false"
          >句首大写</el-checkbox
        >
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import SettingMixin from '@/views/book/courseware/create/components/common/SettingMixin';

import { getJudgeProperty, switchOption } from '@/views/book/courseware/data/judge';

export default {
  name: 'JudgeSetting',
  mixins: [SettingMixin],
  data() {
    return {
      property: getJudgeProperty(),
      switchOption,
    };
  },
  methods: {},
};
</script>

<style lang="scss" scoped>
@use '@/styles/mixin.scss' as *;

.el-form {
  @include setting-base;
}
</style>
