namespace NeonSprawl.Server.Game.Items;
/// Persisted per-player inventory slot state (NEO-54).
public interface IPlayerInventoryStore
{
/// Returns the current snapshot for a known player bucket; false when the player is not in the store.
bool TryGetSnapshot(string playerId, out PlayerInventorySnapshot snapshot);
/// Atomically replaces the full snapshot for a known player; false when the player is not in the store.
bool TryReplaceSnapshot(string playerId, PlayerInventorySnapshot snapshot);
///
/// Atomically reads the current snapshot and optionally persists a replacement under per-player lock (in-memory)
/// or within one database transaction (Postgres).
///
bool TryMutateSnapshot(
string playerId,
Func mutator,
out PlayerInventorySnapshot result);
}