"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MediaType = exports.MediaField = void 0;
const internal_1 = require("../internal");
/**
* Represents a media field.
* @extends ReadOnlyField
*/
class MediaField extends internal_1.ReadOnlyField {
/**
* Creates an instance of the MediaField class.
* @param {string} label The label of the field.
* @param {string} value The URL value of the field
* @param {MediaType} mediaType The media type for the field.
*/
constructor(label, value, mediaType) {
super();
this.displayType = 'media';
this.setLabel(label);
this.setValue(value);
this.mediaType = mediaType;
}
/**
* Gets the media type.
* @returns {MediaType} The media type.
*/
getMediaType() {
return this.mediaType;
}
/**
* Sets the media type.
* @param {MediaType} mediaType The media type to set.
* @returns The updated instance of the MediaField.
*/
setMediaType(mediaType) {
this.mediaType = mediaType;
return this;
}
}
exports.MediaField = MediaField;
/**
* Represents the media type.
*/
var MediaType;
(function (MediaType) {
MediaType["image"] = "image";
MediaType["video"] = "video";
MediaType["audio"] = "audio";
})(MediaType = exports.MediaType || (exports.MediaType = {}));