import { TaskGrade } from '$lib/types/task';
import type { TaskResult, TaskResults } from '$lib/types/task';
import type { WorkBookTaskBase } from '$features/workbooks/types/workbook';

const userId2 = '2';
const userId3 = '3';
const userId4 = '4';
const userId5 = '5';

// 0 out of 3 is accepted
export const taskResultsForUserId2: TaskResults = [
  {
    is_ac: false,
    user_id: userId2,
    status_name: 'wa',
    status_id: '3',
    submission_status_image_path: 'wa.png',
    submission_status_label_name: '挑戦中',
    contest_id: 'abc999',
    task_table_index: 'A',
    task_id: 'abc999_a',
    title: 'A. hoge hoge',
    grade: 'Q7',
    updated_at: new Date(),
  },
  {
    is_ac: false,
    user_id: userId2,
    status_name: 'ns',
    status_id: '4',
    submission_status_image_path: 'ns.png',
    submission_status_label_name: '未挑戦',
    contest_id: 'abc999',
    task_table_index: 'B',
    task_id: 'abc999_b',
    title: 'B. Foo',
    grade: TaskGrade.Q6,
    updated_at: new Date(),
  },
  {
    is_ac: false,
    user_id: userId2,
    status_name: 'ns',
    status_id: '4',
    submission_status_image_path: 'ns.png',
    submission_status_label_name: '未挑戦',
    contest_id: 'abc999',
    task_table_index: 'C',
    task_id: 'abc999_c',
    title: 'C. Bar',
    grade: TaskGrade.Q4,
    updated_at: new Date(),
  },
];

// 2 out of 3 are accepted
export const taskResultsForUserId3: TaskResults = [
  {
    is_ac: true,
    user_id: userId3,
    status_name: 'ac',
    status_id: '1',
    submission_status_image_path: 'ac.png',
    submission_status_label_name: 'AC',
    contest_id: 'abc999',
    task_table_index: 'A',
    task_id: 'abc999_a',
    title: 'A. hoge hoge',
    grade: 'Q7',
    updated_at: new Date(),
  },
  {
    is_ac: true,
    user_id: userId3,
    status_name: 'ac',
    status_id: '1',
    submission_status_image_path: 'ac.png',
    submission_status_label_name: 'AC',
    contest_id: 'abc999',
    task_table_index: 'B',
    task_id: 'abc999_b',
    title: 'B. Foo',
    grade: TaskGrade.Q6,
    updated_at: new Date(),
  },
  {
    is_ac: false,
    user_id: userId3,
    status_name: 'wa',
    status_id: '3',
    submission_status_image_path: 'wa.png',
    submission_status_label_name: '挑戦中',
    contest_id: 'abc999',
    task_table_index: 'C',
    task_id: 'abc999_c',
    title: 'C. Bar',
    grade: TaskGrade.Q4,
    updated_at: new Date(),
  },
];

// 3 out of 3 are accepted
export const taskResultsForUserId4: TaskResults = [
  {
    is_ac: true,
    user_id: userId4,
    status_name: 'ac',
    status_id: '1',
    submission_status_image_path: 'ac.png',
    submission_status_label_name: 'AC',
    contest_id: 'abc999',
    task_table_index: 'A',
    task_id: 'abc999_a',
    title: 'A. hoge hoge',
    grade: 'Q7',
    updated_at: new Date(),
  },
  {
    is_ac: true,
    user_id: userId4,
    status_name: 'ac',
    status_id: '1',
    submission_status_image_path: 'ac.png',
    submission_status_label_name: 'AC',
    contest_id: 'abc999',
    task_table_index: 'B',
    task_id: 'abc999_b',
    title: 'B. Foo',
    grade: TaskGrade.Q6,
    updated_at: new Date(),
  },
  {
    is_ac: true,
    user_id: userId4,
    status_name: 'ac',
    status_id: '1',
    submission_status_image_path: 'ac.png',
    submission_status_label_name: 'AC',
    contest_id: 'abc999',
    task_table_index: 'C',
    task_id: 'abc999_c',
    title: 'C. Bar',
    grade: TaskGrade.Q4,
    updated_at: new Date(),
  },
];

// 4 out of 4 are accepted
export const taskResultsForUserId5: TaskResults = [
  {
    is_ac: true,
    user_id: userId5,
    status_name: 'ac',
    status_id: '1',
    submission_status_image_path: 'ac.png',
    submission_status_label_name: 'AC',
    contest_id: 'abc999',
    task_table_index: 'A',
    task_id: 'abc999_a',
    title: 'A. hoge hoge',
    grade: 'Q7',
    updated_at: new Date(),
  },
  {
    is_ac: true,
    user_id: userId5,
    status_name: 'ac',
    status_id: '1',
    submission_status_image_path: 'ac.png',
    submission_status_label_name: 'AC',
    contest_id: 'abc999',
    task_table_index: 'B',
    task_id: 'abc999_b',
    title: 'B. Foo',
    grade: TaskGrade.Q6,
    updated_at: new Date(),
  },
  {
    is_ac: true,
    user_id: userId5,
    status_name: 'ac',
    status_id: '1',
    submission_status_image_path: 'ac.png',
    submission_status_label_name: 'AC',
    contest_id: 'abc999',
    task_table_index: 'C',
    task_id: 'abc999_c',
    title: 'C. Bar',
    grade: TaskGrade.Q4,
    updated_at: new Date(),
  },
  {
    is_ac: true,
    user_id: userId5,
    status_name: 'ac',
    status_id: '1',
    submission_status_image_path: 'ac.png',
    submission_status_label_name: 'AC',
    contest_id: 'abc999',
    task_table_index: 'D',
    task_id: 'abc999_d',
    title: 'D. Fizz',
    grade: TaskGrade.Q1,
    updated_at: new Date(),
  },
];

export const threeWorkBookTasks: WorkBookTaskBase[] = [
  {
    taskId: 'abc999_a',
    priority: 1,
    comment: '',
  },
  {
    taskId: 'abc999_b',
    priority: 2,
    comment: '',
  },
  {
    taskId: 'abc999_c',
    priority: 3,
    comment: '',
  },
];

const ABS_1: TaskResult = {
  is_ac: true,
  user_id: userId2,
  status_name: 'ac',
  status_id: '1',
  submission_status_image_path: 'ac.png',
  submission_status_label_name: 'AC',
  contest_id: 'abs',
  task_table_index: '1',
  task_id: 'practice_1',
  title: 'Welcome to AtCoder',
  grade: 'Q10',
  updated_at: new Date(),
};
const abc999_a: TaskResult = {
  is_ac: false,
  user_id: userId2,
  status_name: 'wa',
  status_id: '3',
  submission_status_image_path: 'wa.png',
  submission_status_label_name: '挑戦中',
  contest_id: 'abc999',
  task_table_index: 'A',
  task_id: 'abc999_a',
  title: 'A. hoge hoge',
  grade: 'Q7',
  updated_at: new Date(),
};
const abc052_c: TaskResult = {
  is_ac: true,
  user_id: userId2,
  status_name: 'wa',
  status_id: '3',
  submission_status_image_path: 'wa.png',
  submission_status_label_name: '挑戦中',
  contest_id: 'abc052',
  task_table_index: 'C',
  task_id: 'arc067_a',
  title: 'C. Factors of Factorial',
  grade: 'Q3',
  updated_at: new Date(),
};
const abc078_c: TaskResult = {
  is_ac: true,
  user_id: userId2,
  status_name: 'wa',
  status_id: '3',
  submission_status_image_path: 'wa.png',
  submission_status_label_name: '挑戦中',
  contest_id: 'abc078',
  task_table_index: 'C',
  task_id: 'arc085_a',
  title: 'C. HSI',
  grade: 'Q3',
  updated_at: new Date(),
};
const abc347_c: TaskResult = {
  is_ac: false,
  user_id: userId2,
  status_name: 'ns',
  status_id: '4',
  submission_status_image_path: 'ns.png',
  submission_status_label_name: '未挑戦',
  contest_id: 'abc347',
  task_table_index: 'C',
  task_id: 'abc347_c',
  title: 'C. Ideal Holidays',
  grade: 'Q1',
  updated_at: new Date(),
};
const abc347_d: TaskResult = {
  is_ac: false,
  user_id: userId2,
  status_name: 'ns',
  status_id: '4',
  submission_status_image_path: 'ns.png',
  submission_status_label_name: '未挑戦',
  contest_id: 'abc347',
  task_table_index: 'D',
  task_id: 'abc347_d',
  title: 'D. Popcount and XOR',
  grade: 'Q1',
  updated_at: new Date(),
};
const abc347_e: TaskResult = {
  is_ac: false,
  user_id: userId2,
  status_name: 'ns',
  status_id: '4',
  submission_status_image_path: 'ns.png',
  submission_status_label_name: '未挑戦',
  contest_id: 'abc347',
  task_table_index: 'E',
  task_id: 'abc347_e',
  title: 'E. Set Add Query',
  grade: 'Q1',
  updated_at: new Date(),
};
const abc361_a: TaskResult = {
  is_ac: true,
  user_id: userId2,
  status_name: 'ac',
  status_id: '1',
  submission_status_image_path: 'ac.png',
  submission_status_label_name: 'AC',
  contest_id: 'abc361',
  task_table_index: 'A',
  task_id: 'abc361_a',
  title: 'A. Insert',
  grade: 'Q7',
  updated_at: new Date(),
};
const abc362_a: TaskResult = {
  is_ac: true,
  user_id: userId2,
  status_name: 'ac',
  status_id: '1',
  submission_status_image_path: 'ac.png',
  submission_status_label_name: 'AC',
  contest_id: 'abc362',
  task_table_index: 'A',
  task_id: 'abc362_a',
  title: 'A. Buy a Pen',
  grade: 'Q8',
  updated_at: new Date(),
};
const APG4b_ct: TaskResult = {
  is_ac: true,
  user_id: userId2,
  status_name: 'ac',
  status_id: '1',
  submission_status_image_path: 'ac.png',
  submission_status_label_name: 'AC',
  contest_id: 'APG4b',
  task_table_index: 'EX3',
  task_id: 'APG4b_ct',
  title: 'EX3. 1.03',
  grade: 'Q9',
  updated_at: new Date(),
};
const typical90_a: TaskResult = {
  is_ac: false,
  user_id: userId2,
  status_name: 'wa',
  status_id: '3',
  submission_status_image_path: 'wa.png',
  submission_status_label_name: '挑戦中',
  contest_id: 'typical90',
  task_table_index: 'A',
  task_id: 'typical90_a',
  title: '001. Yokan Party（★4）',
  grade: 'Q2',
  updated_at: new Date(),
};
const dp_b: TaskResult = {
  is_ac: false,
  user_id: userId2,
  status_name: 'ns',
  status_id: '4',
  submission_status_image_path: 'ns.png',
  submission_status_label_name: '未挑戦',
  contest_id: 'dp',
  task_table_index: 'B',
  task_id: 'dp_b',
  title: 'B. Frog 2',
  grade: 'Q4',
  updated_at: new Date(),
};
const tdpc_contest: TaskResult = {
  is_ac: false,
  user_id: userId2,
  status_name: 'ns',
  status_id: '4',
  submission_status_image_path: 'ns.png',
  submission_status_label_name: '未挑戦',
  contest_id: 'tdpc',
  task_table_index: 'contest',
  task_id: 'tdpc_contest',
  title: 'A. ツバメ',
  grade: 'PENDING',
  updated_at: new Date(),
};
const ndpc2026_a: TaskResult = {
  is_ac: false,
  user_id: userId2,
  status_name: 'ns',
  status_id: '4',
  submission_status_image_path: 'ns.png',
  submission_status_label_name: '未挑戦',
  contest_id: 'ndpc',
  task_table_index: 'A',
  task_id: 'ndpc2026_a',
  title: 'A. Polyomino',
  grade: 'PENDING',
  updated_at: new Date(),
};
const acl_a: TaskResult = {
  is_ac: false,
  user_id: userId2,
  status_name: 'ns',
  status_id: '4',
  submission_status_image_path: 'ns.png',
  submission_status_label_name: '未挑戦',
  contest_id: 'practice2',
  task_table_index: 'A',
  task_id: 'practice2_a',
  title: 'A. Disjoint Set Union',
  grade: 'PENDING',
  updated_at: new Date(),
};
const past202309_a: TaskResult = {
  is_ac: true,
  user_id: userId2,
  status_name: 'ac',
  status_id: '1',
  submission_status_image_path: 'ac.png',
  submission_status_label_name: 'AC',
  contest_id: 'past16-open',
  task_table_index: 'A',
  task_id: 'past202309_a',
  title: 'A. ツバメ',
  grade: 'PENDING',
  updated_at: new Date(),
};
const joi2023_yo1c: TaskResult = {
  is_ac: true,
  user_id: userId2,
  status_name: 'ac',
  status_id: '1',
  submission_status_image_path: 'ac.png',
  submission_status_label_name: 'AC',
  contest_id: 'joi2023_yo1c',
  task_table_index: 'B',
  task_id: 'joi2023_yo1c_b',
  title: 'B. 11 月 (November)',
  grade: 'Q9',
  updated_at: new Date(),
};
const tessoku_book_a: TaskResult = {
  is_ac: true,
  user_id: userId2,
  status_name: 'ac',
  status_id: '1',
  submission_status_image_path: 'ac.png',
  submission_status_label_name: 'AC',
  contest_id: 'tessoku-book',
  task_table_index: 'A',
  task_id: 'tessoku_book_a',
  title: 'A01. The First Problem',
  grade: 'Q10',
  updated_at: new Date(),
};
const math_and_algorithm_a: TaskResult = {
  is_ac: true,
  user_id: userId2,
  status_name: 'ac',
  status_id: '1',
  submission_status_image_path: 'ac.png',
  submission_status_label_name: 'AC',
  contest_id: 'math-and-algorithm',
  task_table_index: 'A',
  task_id: 'math_and_algorithm_a',
  title: '001. Print 5+N',
  grade: 'Q10',
  updated_at: new Date(),
};

export const tasksForVerificationOfOrder = {
  ABS_1,
  abc999_a,
  abc052_c,
  abc078_c,
  abc347_c,
  abc347_d,
  abc347_e,
  abc361_a,
  abc362_a,
  APG4b_ct,
  typical90_a,
  dp_b,
  tdpc_contest,
  ndpc2026_a,
  past202309_a,
  acl_a,
  joi2023_yo1c,
  tessoku_book_a,
  math_and_algorithm_a,
};
