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

export { arrangeTypeList, switchOption, isEnable };

// 汉字内容
export const conList = [
  {
    value: 'con',
    label: '手动录入'
  },
  {
    value: 'upload',
    label: '上传图片'
  },
]

// 显示
export const showList = [
  {
    value: 'true',
    label: '显示',
  },
  {
    value: 'false',
    label: '不显示',
  },
];

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

export function getWriteProperty() {
  return {
    serial_number: 1,
    sn_type: serialNumberTypeList[0].value,
    sn_position: serialNumberPositionList[0].value,
    sn_display_mode: displayList[0].value,
    frame_type: 'tian',
    frame_color: '#F13232',
    content_type: 'con',
    miao_number: 5,
    write_number: 5,
    is_enable_play_back: showList[0].value,
    is_enable_error: showList[0].value,
  };
}

export function getWriteData() {
  return {
    type: 'write',
    title: '书写组件',
    property: getWriteProperty(),
    content: '',
    content_list: [],
    single_size: 20, // 单位MB
    total_size: 100, // 单位MB
    min_width: '144', // 大于等于最小缩略图宽度
    min_height: '306', // 大于等于2倍缩略图宽度加间隙高度
    file_info_list: [],
    file_id_list: [], // 文件 id['20032-121212', '20032-121216']
    // 内容中包含的文件列表,
    file_list: [],
    answer: {
      answer_list: [],
    },
  };
}
