UNPKG

@manuth/woltlab-compiler

Version:

A compiler for generating WoltLab-Package `.tar` Archives and other WoltLab-Package Components

86 lines (85 loc) 2.19 kB
import { Localization } from "../Globalization/Localization.js"; import { INode } from "../NodeSystem/INode.js"; import { NodeItem } from "../NodeSystem/NodeItem.js"; import { ICategory } from "./Generic/ICategory.js"; import { ICategoryOptions } from "./ICategoryOptions.js"; import { Option } from "./Option.js"; /** * Represents an option-category. * * @template TOption * The type of the options. * * @template TOptionOptions * The type of the data for generating options. */ export declare class Category<TOption extends Option, TOptionOptions> extends NodeItem implements ICategory<TOption> { /** * The human-readable name of the category. */ private displayName; /** * The description of the category. */ private description; /** * A value for ordering the category. */ private showOrder; /** * The options of which at least one needs to be enabled for the category to be shown to the user. */ private enableOptions; /** * The options of the category. */ private options; /** * Initializes a new instance of the {@link Category `Category<TOption, TOptionOptions>`} class. * * @param node * The node of the category. * * @param options * The options of the category. * * @param generator * A function for generating options. */ constructor(node: INode, options: ICategoryOptions<TOptionOptions>, generator: (category: Category<TOption, TOptionOptions>, optionOptions: TOptionOptions) => TOption); /** * @inheritdoc */ get DisplayName(): Localization; /** * @inheritdoc */ get Description(): Localization; /** * @inheritdoc */ get ShowOrder(): number; /** * @inheritdoc */ set ShowOrder(value: number); /** * @inheritdoc */ get EnableOptions(): string[]; /** * @inheritdoc */ set EnableOptions(value: string[]); /** * @inheritdoc */ get Options(): readonly TOption[]; /** * @inheritdoc * * @returns * The objects of the node. */ GetObjects(): Record<string, unknown>; }