woltlab-compiler
Version:
A compiler for WoltLab-Package Archives and WoltLab-Package Components
59 lines • 1.46 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const util_1 = require("util");
const Localization_1 = require("../Globalization/Localization");
/**
* Represents an item of an option.
*/
class OptionItem {
/**
* Initializes a new instance of the `OptionItem` class.
*
* @param option
* The option of the item.
*/
constructor(option, options) {
/**
* The human-readable name of the item.
*/
this.displayName = new Localization_1.Localization();
this.option = option;
this.Name = options.Name;
if (!util_1.isNullOrUndefined(options.DisplayName)) {
this.DisplayName.Data = options.DisplayName;
}
this.Value = options.Value;
}
/**
* Gets or sets the name of the item.
*/
get Name() {
return this.name;
}
set Name(value) {
this.name = value;
}
/**
* Gets the human-readable name of the item.
*/
get DisplayName() {
return this.displayName;
}
/**
* Gets the value of the item.
*/
get Value() {
return this.value;
}
set Value(value) {
this.value = value;
}
/**
* Gets the option of the item.
*/
get Option() {
return this.option;
}
}
exports.OptionItem = OptionItem;
//# sourceMappingURL=OptionItem.js.map