/*
 * @Author: xiejiang
 * @Date: 2023-07-28 16:52:59
 * @LastEditors: xiejiang
 * @LastEditTime: 2024-03-11 10:48:47
 * @Description:
 * Copyright（c）2023 by 好老师教育科技有限公司 All right Reserved.
 */
export interface Props {
  blockLength?: number
  blockRadius?: number
  canvasWidth?: number
  canvasHeight?: number
  sliderHint?: string
  accuracy?: number
  imageList?: any
}

export interface State {
  isFrontCheck: boolean
  verifyActive: boolean
  verifySuccess: boolean
  verifyFail: boolean
  blockObj: any
  canvasCtx: any
  blockCtx: any
  blockWidth: number
  blockX: number
  blockY: number
  image: HTMLImageElement
  originX: number
  originY: number
  dragDistanceList: number[]
  sliderBoxWidth: number | string
  sliderButtonLeft: number | string
  isMouseDown: boolean
  isLoading: boolean
  timestamp: number
  successHint: string
  nonceStr: string | undefined
}

type EmitPropsData = {
  nonceStr?: undefined | string
  value?: undefined | number
  blockY?: undefined | number
}

export interface EmitProps {
  (e: 'success', val: EmitPropsData): void
  (e: 'again'): void
}
