import 'inventory_adjustment_result.dart';
import 'inventory_item.dart';

abstract class InventoryRepository {
  /// Returns all inventory items.
  Future<List<InventoryItem>> getInventoryItems();

  /// Adjusts the quantity of an item by [delta] (positive = add, negative = remove).
  /// Returns an [InventoryAdjustmentResult] indicating success or failure.
  Future<InventoryAdjustmentResult> adjustQuantity(String id, int delta, String reason);

  /// Sets the quantity of an item to an absolute [quantity].
  /// Returns an [InventoryAdjustmentResult] indicating success or failure.
  Future<InventoryAdjustmentResult> setQuantity(String id, int quantity, String reason);

  /// Creates a new inventory item.
  /// Returns the created [InventoryItem].
  Future<InventoryItem> createItem(InventoryItem item);

  /// Updates an existing inventory item with all fields from [item].
  /// Returns the updated [InventoryItem].
  Future<InventoryItem> updateItem(InventoryItem item);

  /// Updates the image URL for an inventory item.
  /// Returns an [InventoryAdjustmentResult] indicating success or failure.
  Future<InventoryAdjustmentResult> updateItemImage(String id, String imageUrl);
}
