import type { Ref, CSSProperties } from 'vue'
import { ElTable } from 'element-plus'
import { CommonData, CommonTableColumn, CommonValue, MaybeRef } from '~/common'

type HeaderRenderProps = {
  column: CommonTableColumn
  columns: CommonTableColumn[]
  columnIndex: number
  headerIndex: number
}
type CellRenderProps = {
  cellData: CommonValue
  column: CommonTableColumn
  columns: CommonTableColumn[]
  columnIndex: number
  rowData: CommonData
  rowIndex: number
}
type RowClassGetter = (param: {
  columns: CommonTableColumn[]
  rowData: any
  rowIndex: number
}) => string
type ExportOptions = {
  table: MaybeRef<InstanceType<typeof ElTable>>
  sheetName?: string
  fileName?: string
  headerRowNumber?: number
}
type ExportHandler = (option: ExportOptions) => void
type ScrollParams = {
  xAxisScrollDir: 'forward' | 'backward'
  scrollLeft: number
  yAxisScrollDir: 'forward' | 'backward'
  scrollTop: number
}
