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

var AttachmentSourceType;
(function (AttachmentSourceType) {
  AttachmentSourceType["RawUrl"] = "raw-url";
  AttachmentSourceType["AttachmentObject"] = "object";
  AttachmentSourceType["AttachmentObjects"] = "objects";
})(AttachmentSourceType || (AttachmentSourceType = {}));
var AttachmentDataType;
(function (AttachmentDataType) {
  AttachmentDataType["Image"] = "image";
})(AttachmentDataType || (AttachmentDataType = {}));
class AttachmentField extends BaseField {
  constructor(id, title) {
    super(id, 'attachment');
    this.sourceType = AttachmentSourceType.RawUrl;
    // required only if the source type is 'raw-url'
    this.dataType = AttachmentDataType.Image;
    this.shape = 'rounded';
    this.title = title;
  }
  showPreview() {
    this.preview = true;
    return this;
  }
  setShape(shape) {
    this.shape = shape;
    return this;
  }
}
AttachmentField.type = 'attachment';

export { AttachmentSourceType as A, AttachmentField as a };
