import type { Crop } from '../../constants/crops.js';
import type { Stat } from '../../constants/stats.js';
import type { EffectSummary, FortuneSourceProgress, FortuneUpgrade, UpgradeInfo } from '../../constants/upgrades.js';
import type { Effect } from '../../effects/types.js';
import type { EliteItemDto } from '../../fortune/item.js';
import type { UpgradeableInfo } from '../../fortune/upgradeable.js';
export interface DynamicFortuneSource<T> {
    name: string;
    crop?: Crop;
    api?: boolean;
    conditional?: boolean;
    alwaysInclude?: true;
    wiki?: (source: T) => string | undefined;
    exists: (source: T) => boolean;
    active?: (source: T) => {
        active: boolean;
        reason?: string;
        fortune?: number;
    };
    activeStat?: (source: T, stat: Stat) => {
        active: boolean;
        reason?: string;
        value?: number;
    };
    max: (source: T) => number;
    current: (source: T) => number;
    maxStat?: (source: T, stat: Stat) => number;
    currentStat?: (source: T, stat: Stat) => number;
    effects?: (source: T, stats?: Stat[]) => EffectSummary[];
    calculationEffects?: (source: T) => Effect[];
    progress?: (source: T, stats?: Stat[]) => FortuneSourceProgress[] | undefined;
    info?: (source: T) => {
        item?: EliteItemDto;
        info?: UpgradeableInfo;
        nextInfo?: UpgradeableInfo;
        maxInfo?: UpgradeableInfo;
    };
    upgrades?: (source: T, stats?: Stat[]) => FortuneUpgrade[];
}
export interface DynamicUpgradeSource<T, Output = unknown> {
    name: string;
    api?: boolean;
    conditional?: boolean;
    key?: string | ((source: T) => string);
    wiki?: (source: T) => string | undefined;
    exists: (source: T) => boolean;
    active?: (source: T) => {
        active: boolean;
        reason?: string;
        output?: Output;
    };
    max: (source: T) => Output;
    current: (source: T) => Output;
    progress: (source: T) => UpgradeSourceProgress<Output>;
    info?: (source: T) => {
        item?: EliteItemDto;
        info?: UpgradeableInfo;
        nextInfo?: UpgradeableInfo;
        maxInfo?: UpgradeableInfo;
    };
    upgrades?: (source: T) => UpgradeInfo<Output>[];
}
export interface UpgradeSourceProgress<Output> {
    key?: string;
    name: string;
    current: number;
    max: number;
    perLevel: number;
    ratio: number;
    wiki?: string;
    upgrades?: UpgradeInfo<Output>[];
    progress?: UpgradeSourceProgress<Output>[];
    item?: EliteItemDto;
    info?: UpgradeableInfo;
    nextInfo?: UpgradeableInfo;
    maxInfo?: UpgradeableInfo;
    api?: boolean;
    active?: {
        active: boolean;
        reason?: string;
        output?: Output;
    };
}
