import { B as BaseField } from './BaseField-461b6d0c.js';

class ReferenceField extends 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';

export { ReferenceField as R };
