@kitten-science/kitten-scientists
Version:
Add-on for the wonderful incremental browser game: https://kittensgame.com/web/
43 lines • 1.72 kB
TypeScript
import type { Setting } from "../../settings/Settings.js";
import type { Season } from "../../types/index.js";
import { SettingListItem } from "./SettingListItem.js";
import { SettingsList, type SettingsListOptions } from "./SettingsList.js";
import type { UiComponent } from "./UiComponent.js";
export type SettingWithSeasons = Record<Season, Setting>;
export type SeasonsListOptions = ThisType<SeasonsList> & SettingsListOptions & {
/**
* Called when a season is checked.
*
* @param label The label on the season element.
* @param setting The setting associated with the season.
*/
readonly onCheckSeason?: (label: string, setting: Setting, isBatchProcess?: boolean) => void;
/**
* Called when a season is unchecked.
*
* @param label The label on the season element.
* @param setting The setting associated with the season.
*/
readonly onUnCheckSeason?: (label: string, setting: Setting, isBatchProcess?: boolean) => void;
};
/**
* A list of 4 settings correlating to the 4 seasons.
*/
export declare class SeasonsList extends SettingsList {
readonly options: SeasonsListOptions;
readonly setting: SettingWithSeasons;
readonly spring: SettingListItem;
readonly summer: SettingListItem;
readonly autumn: SettingListItem;
readonly winter: SettingListItem;
/**
* Constructs a `SeasonsList`.
*
* @param host A reference to the host.
* @param setting The settings that correlate to this list.
* @param options Options for this list
*/
constructor(parent: UiComponent, setting: SettingWithSeasons, options?: SeasonsListOptions);
toString(): string;
}
//# sourceMappingURL=SeasonsList.d.ts.map