@manuth/woltlab-compiler
Version:
A compiler for generating WoltLab-Package `.tar` Archives and other WoltLab-Package Components
65 lines • 1.44 kB
JavaScript
import { Localization } from "../Globalization/Localization.js";
/**
* Represents an item of an option.
*/
export class OptionItem {
/**
* Initializes a new instance of the {@link OptionItem `OptionItem`} class.
*
* @param option
* The option of the item.
*
* @param options
* The options of the item.
*/
constructor(option, options) {
/**
* The human-readable name of the item.
*/
this.displayName = new Localization();
this.option = option;
this.Name = options.Name;
if ((options.DisplayName !== null) &&
(options.DisplayName !== undefined)) {
this.DisplayName.Load(options.DisplayName);
}
this.Value = options.Value;
}
/**
* Gets or sets the name of the item.
*/
get Name() {
return this.name;
}
/**
* @inheritdoc
*/
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;
}
/**
* @inheritdoc
*/
set Value(value) {
this.value = value;
}
/**
* Gets the option of the item.
*/
get Option() {
return this.option;
}
}
//# sourceMappingURL=OptionItem.js.map