import {
  arrangeTypeList,
  serialNumberTypeList,
  serialNumberPositionList,
  displayList,
} from '@/views/book/courseware/data/common';
import { getRandomNumber } from '@/utils';
export { arrangeTypeList };

export function getOption() {
  return {
    mark: getRandomNumber(),
    content: '',
    custom_serial_number: '', // 自定义序号
  };
}

export function getSortProperty() {
  return {
    serial_number: 1,
    sn_type: serialNumberTypeList[0].value,
    sn_position: serialNumberPositionList[0].value,
    sn_display_mode: displayList[0].value,
    option_count: 3,
    arrange_direction: arrangeTypeList[0].value,
  };
}

export function getSortData() {
  return {
    type: 'sort',
    title: '排序',
    option_list: [getOption(), getOption(), getOption()],
    min_height: 80,
    min_width: 280,
    property: getSortProperty(),
  };
}
