'use strict';

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

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

exports.AttachmentField = AttachmentField;
