<template>
  <div>
    <el-form :model="property" :label-position="labelPosition" label-width="72px">
      <SerailNumber :property="property" />

      <el-form-item label="拼音">
        <el-switch v-model="property.view_pinyin" active-value="true" inactive-value="false" />
      </el-form-item>
      <el-form-item 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 label="">
        <el-checkbox
          v-model="property.is_first_sentence_first_hz_pinyin_first_char_upper_case"
          :disabled="!isEnable(property.view_pinyin)"
          >句首大写</el-checkbox
        >
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import SettingMixin from '@/views/book/courseware/create/components/common/SettingMixin';
import { isEnable, viewMethodList, pinyinPositionList } from '@/views/book/courseware/data/common';
import { getDescribeProperty } from '@/views/book/courseware/data/describe';

export default {
  name: 'DescribeSetting',
  mixins: [SettingMixin],
  data() {
    return {
      isEnable,
      viewMethodList,
      pinyinPositionList,
      labelPosition: 'left',
      property: getDescribeProperty(),
      selectContent: '',
      visible: false,
      content: '',
    };
  },
  methods: {},
};
</script>

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

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