/**
 * 이 클래스는 camera 의 설정을 위한 에디터로 동작한다.
 */

import '../component/robot-arm-pose-simple-input'

import { html } from 'lit-element'

import { OxPropertyEditor } from '@operato/property-editor'

export class OffsetPoseSimpleEditor extends OxPropertyEditor {
  static get styles() {
    return [...OxPropertyEditor.styles]
  }

  static get properties() {
    return {
      value: Object,
      host: Object
    }
  }

  editorTemplate(props) {
    if ('connection' in this.host) {
      var connection = this.host.connection // case host is a task
    } else {
      var connection = this.host.name // case host is a connection
    }

    return html`
      <div>
        <robot-arm-pose-simple-input .connection=${connection} .value=${this.value}></robot-arm-pose-simple-input>
      </div>
    `
  }
}

customElements.define('offset-pose-simple-editor', OffsetPoseSimpleEditor)
