import { RobotArmStatus } from '../robotics-types'
import { ConnectionManager } from '@things-factory/integration-base'
import { api } from './decorators'

export class RobotArmAPI {
  static platforms = {}

  static registerPlatform(name, apis) {
    RobotArmAPI.platforms[name] = {
      apis
    }
  }

  static getPlatform(name) {
    return RobotArmAPI.platforms[name]
  }

  static getRobotArm(domain, name) {
    return ConnectionManager.getConnectionInstanceByName(domain, name)
  }

  @api
  static reset(domain, robotArmName): any {}

  @api
  static getStatus(domain, robotArmName): RobotArmStatus {
    return
  }

  @api
  static getPose(domain, robotArmName): any {}

  @api
  static getJoints(domain, robotArmName): any {}

  @api
  static goHome(domain, robotArmName): any {}

  @api
  static goZero(domain, robotArmName): any {}

  @api
  static moveTo(domain, robotArmName, { pose }): any {}

  @api
  static moveToJoints(domain, robotArmName, { joints }): any {}

  @api
  static moveBy(domain, robotArmName, { pose }): any {}

  @api
  static moveByNoWait(domain, robotArmName, { pose }): any {}

  @api
  static startTeachingMode(domain, robotArmName): any {}

  @api
  static finishTeachingMode(domain, robotArmName): any {}

  @api
  static setHome(domain, robotArmName, { joints }): any {}
}
