import {
  displayList,
  serialNumberTypeList,
  serialNumberPositionList,
  arrangeTypeList,
  switchOption,
  isEnable,
} from '@/views/book/courseware/data/common';

export { arrangeTypeList, switchOption, isEnable };



// 显示
export const positionList = [
  {
    value: 'top',
    label: '上',
  },
  {
    value: 'bottom',
    label: '下',
  },
];

// 汉字框
export const frameList = [
  {
    value: 'tian',
    label: '田字格',
  },
  {
    value: 'fang',
    label: '方框',
  },
  {
    value: 'none',
    label: '无',
  },
];

export function getArticleProperty() {
  return {
    serial_number: 1,
    sn_type: serialNumberTypeList[0].value,
    sn_position: serialNumberPositionList[0].value,
    sn_display_mode: displayList[0].value,
    mp3_position: positionList[0].value,
    is_enable_new_word: switchOption[0].value,
    is_enable_read: switchOption[0].value,
    is_enable_word: switchOption[0].value,
    is_enable_pinyin: true,
    pinyin_position: positionList[0].value,
    is_enable_sentence_case: true,
  };
}

export function getArticleData() {
  return {
    type: 'article',
    title: '课文组件',
    property: getArticleProperty(),
    content: '', // 课文内容
    mp3_list: [], // 音频列表
    detail: [], // 分段分句分词详情
    word_time: [], // 字幕时间
    new_word_list: [], // 生词列表
    sentence_list_mp: [], //句子+分词数组
  };
}
