'use strict';

const BaseField = require('./BaseField-381327a9.js');

class ReferenceField extends BaseField.BaseField {
  constructor(id, title, titleField, imageField, otherCollection, fields, isSingle = false) {
    super(id, 'reference');
    this.title = title;
    this.titleField = titleField;
    this.imageField = imageField;
    this.otherCollection = otherCollection;
    this.fields = fields;
    this.isSingle = isSingle;
  }
  static decode(json) {
    return Object.assign(Object.create(ReferenceField.prototype), json);
  }
  showPreview() {
    this.preview = true;
    return this;
  }
  getDisplayValue(value) {
    return value;
  }
}
ReferenceField.type = 'reference';

exports.ReferenceField = ReferenceField;
