<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.arrange_type">
          <el-radio v-for="{ value, label } in arrangeTypeList" :key="value" :label="value">
            {{ label }}
          </el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="音频位置">
        <el-radio-group v-model="property.audio_position">
          <el-radio v-for="{ value, label } in audioPositionList" :key="value" :label="value">
            {{ label }}
          </el-radio>
        </el-radio-group>
      </el-form-item>
      <el-divider />
      <el-form-item label="读音">
        <el-select v-model="property.audio_generation_method" placeholder="请选择">
          <el-option v-for="{ value, label } in audioGenerationMethodList" :key="value" :label="label" :value="value" />
        </el-select>
      </el-form-item>
      <el-form-item label="填空字体">
        <el-select v-model="property.fill_font" placeholder="请选择">
          <el-option v-for="{ value, label } in fillFontList" :key="value" :label="label" :value="value" />
        </el-select>
      </el-form-item>
      <el-divider />
      <el-form-item label="语音作答">
        <el-radio-group v-model="property.is_enable_voice_answer">
          <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>
  </div>
</template>

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

import {
  getFillProperty,
  arrangeTypeList,
  audioPositionList,
  audioGenerationMethodList,
  fillFontList,
  switchOption,
} from '@/views/book/courseware/data/fill';

export default {
  name: 'FillSetting',
  mixins: [SettingMixin],
  data() {
    return {
      property: getFillProperty(),
      arrangeTypeList,
      audioPositionList,
      audioGenerationMethodList,
      fillFontList,
      switchOption,
    };
  },
  methods: {},
};
</script>

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

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