import { ContentBlockNode } from '@/__generated__/graphql';

export type numberOrUndefined = number | undefined;

type types = 'task' | 'normal' | 'base_communication' | 'base_society' | 'base_interdisciplinary' | 'instrument';

export interface Page {
  id: string;
  title: string;
}

export interface InstrumentCategory {
  id: string;
  name: string;
  background: string;
  foreground: string;
  types: any[];
}

export interface Hideable {
  userCreated: boolean;
  // hiddenFor: any[];
  // visibleFor: any[];
  titleHiddenFor: any[];
  descriptionHiddenFor: any[];
  hidden: boolean;
}

export interface ContentBlock extends Hideable, Page {
  contents: any[];
  isAssignment: boolean;
  type: types;
  notes: any[];
  bookmarks: any[];
  instrumentCategory: InstrumentCategory;
  mine: boolean;
  root: string;
}

export interface ExtendedContentBlockNode extends ContentBlockNode {
  indent?: boolean;
  notes: any[];
  root: string;
}

export interface Chapter extends Hideable, Page {
  contentBlocks: ExtendedContentBlockNode[];
  bookmark: any;
  titleHidden: boolean;
  descriptionHidden: boolean;
  description: string;
}

export interface ActionOptions {
  up?: boolean;
  down?: boolean;
  extended?: boolean;
}

export type ActivityProperty = 'myHighlights' | 'myBookmarks' | 'mySubmissions' | 'myAnswers';
export type InstrumentActivityProperty = 'highlights' | 'bookmarks';
