import BaseSystem from './BaseSystem';

/**
 * @class WinningSymbolTintingSystem
 * @description
 * System responsible for marking winning symbols in the `tinting`,
 * based on the data from `winningSymbols`. This system does not
 * apply visual effects directly but sets tinting flags for other systems
 * to process.
 *
 * This is part of the slot machine game architecture, ensuring that
 * winning symbols are properly flagged for tinting effects.
 */
export default class WinningSymbolTintingSystem extends BaseSystem
{
    public state: string = 'stopped';

    static override requiredMaps: string[] = ['tinting', 'winningSymbols'];

    onEnter(): void
    {
        this.machine.maps.tinting = this.machine.maps.winningSymbols.map((v: boolean) => !v);
    }

    onLeave(): void
    {
    // do nothing
    }

    update(_dt: number): void
    {
    // do nothing
    }
}
