export default class Outline {
  doc: number
  messageHandler: any
  outline: any
  index: number
  children: Outline[] | []
  parent: Outline | null

  constructor(options: {
    doc: number,
    messageHandler: any,
    outline: any,
    index: number,
    children: Outline[] | [],
    parent: Outline | null,
  }) {
    this.doc = options.doc
    this.messageHandler = options.messageHandler
    this.outline = options.outline
    this.index = options.index
    this.children = options.children || []
    this.parent = options.parent
  }

  get pageNumber() {
    return this.outline.pageNumber
  }

  get title() {
    return this.outline.title
  }

  get level() {
    return this.outline.level
  }

  getOutline() {
    return this.outline
  }
}
