import { IconDefinition } from '@fortawesome/fontawesome-svg-core'
import { MarkRect } from './mark'

export interface MouseState {
  clicked?: boolean
  dragging?: boolean
  resizing?: boolean
  coordsInWrapper?: {
    x: number
    y: number
  }
}

export interface PdfPage {
  image: string
  width: number
  drawnFields: DrawnField[]
}

export interface DrawnField extends MarkRect {
  type: MarkType
  /**
   * npub of a counter part
   */
  counterpart: string
}

export interface DrawTool {
  identifier: MarkType
  label: string
  icon: IconDefinition
  defaultValue?: string
  selected?: boolean
  active?: boolean
}

export enum MarkType {
  TEXT = 'TEXT',
  SIGNATURE = 'SIGNATURE',
  JOBTITLE = 'JOBTITLE',
  FULLNAME = 'FULLNAME',
  INITIALS = 'INITIALS',
  DATETIME = 'DATETIME',
  DATE = 'DATE',
  NUMBER = 'NUMBER',
  IMAGES = 'IMAGES',
  CHECKBOX = 'CHECKBOX',
  MULTIPLE = 'MULTIPLE',
  FILE = 'FILE',
  RADIO = 'RADIO',
  SELECT = 'SELECT',
  CELLS = 'CELLS',
  STAMP = 'STAMP',
  PAYMENT = 'PAYMENT',
  PHONE = 'PHONE'
}
