/**
 * Stats Manager Module
 * Ported from Python stats/stats_manager.py
 *
 * Contains all stats and state update functions:
 * - checkDilemmas: Legacy dilemma polling (deprecated, kept for compatibility tests)
 * - checkEvents: Legacy event polling (deprecated, kept for compatibility tests)
 * - checkTutorialEvents: Legacy tutorial polling (deprecated, kept for compatibility tests)
 * - handleMoods: Update character moods based on stats
 * - handleFinances: Handle character finances and savings
 * - receiveSalary: Weekly salary with savings deduction based on spending habits
 * - calculateMonthlyExpenses: Monthly expense calculation based on spending habits
 * - getSavingsRate: Get savings rate for a spending habit
 * - getPeakEnergy: Calculate peak energy based on activities
 * - connect: Handle player reconnection and offline stats
 */
import { Player, Person } from '../models/index.js';
/**
 * Spending habit types that affect savings rate and expenses
 * - frugal: Conservative spending, saves 20% of income
 * - normal: Balanced spending, saves 10% of income
 * - extravagant: High spending, saves only 5% of income
 */
export type SpendingHabit = 'frugal' | 'normal' | 'extravagant';
/**
 * Savings rates by spending habit type
 * These determine what percentage of income goes to savings vs spending
 */
export declare const SAVINGS_RATES: Record<SpendingHabit, number>;
/**
 * Monthly expense modifiers by spending habit
 * Base expenses are multiplied by these values
 */
export declare const EXPENSE_MODIFIERS: Record<SpendingHabit, number>;
/**
 * Base monthly expenses (rent, utilities, food, etc.)
 */
export declare const BASE_MONTHLY_EXPENSES = 800;
/**
 * Part-time job income modifier (30% of full salary)
 */
export declare const PART_TIME_MODIFIER = 0.3;
import { EventResult } from '../events/base.js';
/**
 * Handle player reconnection and display offline time message
 */
export declare function connect(player: Player): void;
/**
 * Legacy dilemma polling path removed from active runtime.
 * @deprecated Active runtime uses events/v2 engine in PlayerSession.
 */
export declare function checkDilemmas(_player: Player): EventResult;
/**
 * Legacy event polling path removed from active runtime.
 * @deprecated Active runtime uses events/v2 engine in PlayerSession.
 */
export declare function checkEvents(_player: Player, _type?: string): EventResult;
/**
 * Check and trigger tutorial events if player is in tutorial mode
 * @deprecated Active runtime uses events/v2 engine in PlayerSession.
 */
export declare function checkTutorialEvents(player: Player, type?: string): EventResult;
/**
 * Check if a schedule has been completed
 */
export declare function scheduleComplete(person: Person, scheduleId: string): boolean;
/**
 * Update character mood based on energy and happiness levels
 */
export declare function handleMoods(_player: Player, person: Person): void;
/**
 * Get the savings rate for a given spending habit
 *
 * @param spendingHabit - The person's spending habit type
 * @returns The savings rate as a decimal (0.05 to 0.20)
 */
export declare function getSavingsRate(spendingHabit: SpendingHabit | undefined): number;
/**
 * Get the expense modifier for a given spending habit
 *
 * @param spendingHabit - The person's spending habit type
 * @returns The expense modifier (0.7 to 1.5)
 */
export declare function getExpenseModifier(spendingHabit: SpendingHabit | undefined): number;
/**
 * Calculate monthly expenses based on spending habits
 *
 * Monthly expenses are calculated as:
 * - Base expenses ($800) multiplied by spending habit modifier
 * - frugal: $800 * 0.7 = $560/month
 * - normal: $800 * 1.0 = $800/month
 * - extravagant: $800 * 1.5 = $1200/month
 *
 * @param person - The person to calculate expenses for
 * @returns Monthly expense amount
 */
export declare function calculateMonthlyExpenses(person: Person): number;
/**
 * Calculate weekly expenses based on spending habits
 *
 * @param person - The person to calculate expenses for
 * @returns Weekly expense amount (monthly / 4)
 */
export declare function calculateWeeklyExpenses(person: Person): number;
/**
 * Receive weekly salary and apply savings based on spending habits
 *
 * This function processes a weekly salary payment:
 * 1. Applies part-time modifier if applicable (30% of full salary)
 * 2. Calculates savings based on spending habit (5-20%)
 * 3. Adds savings to person's money
 *
 * Savings rates by habit:
 * - frugal: 20% of income saved
 * - normal: 10% of income saved
 * - extravagant: 5% of income saved
 *
 * @param person - The person receiving salary
 * @param weeklySalary - The gross weekly salary amount
 * @returns Object containing savings amount and net income after savings
 */
export declare function receiveSalary(person: Person, weeklySalary: number): {
    savings: number;
    netIncome: number;
};
/**
 * Handle character finances including income and savings
 * Ported from Python stats_manager.py handleFinances()
 *
 * This function processes finances based on activity records:
 * 1. Iterates through activity records to find job income
 * 2. Applies part-time modifier if applicable (30% of full salary)
 * 3. Calculates savings based on spending habit (5-20%)
 * 4. Adds savings to person's money
 *
 * Spending habit effects on savings rate:
 * - frugal: 20% savings (saves more, spends less)
 * - normal: 10% savings (balanced lifestyle)
 * - extravagant: 5% savings (spends more, saves less)
 *
 * @param person - The person whose finances to handle
 */
export declare function handleFinances(person: Person): void;
/**
 * Apply monthly expenses to a person's money
 * Should be called once per month (every 30 game days)
 *
 * @param person - The person to deduct expenses from
 * @returns The amount deducted
 */
export declare function applyMonthlyExpenses(person: Person): number;
/**
 * Apply weekly expenses to a person's money
 * Should be called once per week (every 7 game days)
 *
 * @param person - The person to deduct expenses from
 * @returns The amount deducted
 */
export declare function applyWeeklyExpenses(person: Person): number;
/**
 * Get a financial summary for a person
 * Useful for displaying financial information to the player
 *
 * @param person - The person to get financial info for
 * @returns Financial summary object
 */
export declare function getFinancialSummary(person: Person): {
    currentMoney: number;
    spendingHabit: SpendingHabit;
    savingsRate: number;
    monthlyExpenses: number;
    weeklyExpenses: number;
    savingsRatePercent: string;
};
/**
 * Calculate peak energy based on activities, habits, and focus settings
 * Updates person.peakEnergy and person.calcEnergy
 */
export declare function getPeakEnergy(person: Person): void;
/**
 * Update age for player and all relationships, with affinity decay
 * Ported from Python stats_manager.py updateAge()
 *
 * Decay mechanics:
 * - Player age increments hourly (ageHours) and daily (ageDays)
 * - Every 30 days (for player > 18 years): affinity -= 1 for all relationships
 * - On relationship birthday (yearly): affinity -= 1 + death chance update
 * - Affinity floor at -100
 *
 * @returns Event result for birthday messages, or null
 */
export declare function updateAge(player: Player): EventResult;
/**
 * Apply daily familiarity decay for all relationships
 * Ported from Python loop_manager.py daily tick
 *
 * Called at hour 0 (daily tick): familiarity -= 3 for alive relationships with familiarity > 0
 */
export declare function applyDailyFamiliarityDecay(player: Player): void;
/**
 * Handle weekly relationship decay and random events
 * Ported from Python: handleRelationships in functions.py and relationship_manager.py
 *
 * Weekly decay mechanics:
 * - Familiarity decays by 1 per week (toward 0)
 * - Affinity decays by 1 per week for positive values (toward 0)
 * - 5% chance of random relationship events for romantic relationships
 */
export declare function handleRelationships(player: Player, _person: Person): void;
/**
 * Set random likes and dislikes for a character
 */
export declare function setLikesDislikes(person: Person): Person;
/**
 * Handle incremental state updates to send to client
 * Only includes changed values to minimize data transfer
 */
export declare function handleUpdates(updateObject: Record<string, unknown>, player: Player, _websocket: unknown): Record<string, unknown> | false;
/**
 * Parse and trigger one-time scheduled events
 */
export declare function parseOneTimeEvents(player: Player): void;
export declare const statsManager: {
    connect: typeof connect;
    checkDilemmas: typeof checkDilemmas;
    checkEvents: typeof checkEvents;
    checkTutorialEvents: typeof checkTutorialEvents;
    parseOneTimeEvents: typeof parseOneTimeEvents;
    scheduleComplete: typeof scheduleComplete;
    handleMoods: typeof handleMoods;
    getSavingsRate: typeof getSavingsRate;
    getExpenseModifier: typeof getExpenseModifier;
    calculateMonthlyExpenses: typeof calculateMonthlyExpenses;
    calculateWeeklyExpenses: typeof calculateWeeklyExpenses;
    receiveSalary: typeof receiveSalary;
    handleFinances: typeof handleFinances;
    applyMonthlyExpenses: typeof applyMonthlyExpenses;
    applyWeeklyExpenses: typeof applyWeeklyExpenses;
    getFinancialSummary: typeof getFinancialSummary;
    getPeakEnergy: typeof getPeakEnergy;
    handleRelationships: typeof handleRelationships;
    applyDailyFamiliarityDecay: typeof applyDailyFamiliarityDecay;
    updateAge: typeof updateAge;
    setLikesDislikes: typeof setLikesDislikes;
    handleUpdates: typeof handleUpdates;
};
//# sourceMappingURL=stats_manager.d.ts.map