<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.frame_type">
          <el-radio v-for="{ value, label } in frameList" :key="value" :label="value" :value="value">
            {{ label }}
          </el-radio>
        </el-radio-group>
      </el-form-item>
      <!-- <el-form-item label="汉字内容">
        <el-radio-group v-model="property.content_type">
          <el-radio v-for="{ value, label } in conList" :key="value" :label="value" :value="value">
            {{ label }}
          </el-radio>
        </el-radio-group>
      </el-form-item> -->
      <el-form-item label="框颜色">
        <el-color-picker v-model="property.frame_color"></el-color-picker>
      </el-form-item>

      <el-divider />
      <el-form-item label="描红格" v-if="property.content_type === 'con'">
        <el-input-number v-model="property.miao_number" :min="0" :step="1" />
      </el-form-item>
      <el-form-item label="书写格">
        <el-input-number v-model="property.write_number" :min="0" :step="1" />
      </el-form-item>
      <el-divider />
      <!-- <el-form-item label="错误提示" v-if="property.content_type === 'con'">
        <el-radio-group v-model="property.is_enable_error">
          <el-radio v-for="{ value, label } in showList" :key="value" :label="value">
            {{ label }}
          </el-radio>
        </el-radio-group>
      </el-form-item> -->
      <el-form-item label="笔迹回放">
        <el-radio-group v-model="property.is_enable_play_back">
          <el-radio v-for="{ value, label } in showList" :key="value" :label="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 {
  getWriteProperty,
  switchOption,
  funList,
  showList,
  isEnable,
  frameList,
  conList,
} from '@/views/book/courseware/data/write';

export default {
  name: 'WriteSetting',
  mixins: [SettingMixin],
  data() {
    return {
      property: getWriteProperty(),
      switchOption,
      isEnable,
      funList,
      showList,
      frameList,
      conList,
    };
  },
  methods: {},
};
</script>

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

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