import type { CSSProperties } from 'vue'
import type { Node } from '@antv/x6'

export type BackgroundOptions = {
  
  image?: string

  
  position?: { x: number; y: number }

  
  size?: { height: number; width: number }

  
  angle?: number

  
  opacity?: number

  
  ediNodeOptions?: Node.Config

  
  onDraw?: () => any

  
  onEdit?: () => any

  
  onEditCancel?: () => any

  
  onClear?: () => any
}

export type BackgroundPlugin = {
  
  $background: {
    
    draw: (options?: BackgroundOptions) => any

    
    edit: () => any

    
    cancleEdit: () => any

    
    update: (options?: BackgroundOptions) => any

    
    clear: () => any

    
    getConfig: () => BackgroundOptions

    
    getBackgroundNode: () => Node | null
  }
}

export type BackgroundPluginOptions = {
  
  $background?: BackgroundOptions
}
