/// Address Repository Interface
///
/// Defines contract for address data operations.
library;

import 'package:worker/features/account/domain/entities/address.dart';

/// Address Repository
///
/// Repository interface for managing user addresses.
/// Online-only approach - all operations go directly to API.
abstract class AddressRepository {
  /// Get list of addresses
  ///
  /// Fetches all addresses for the authenticated user.
  /// Optionally filter by default address status.
  Future<List<Address>> getAddresses({bool? isDefault});

  /// Create new address
  ///
  /// Creates a new address and returns the created address with ID.
  Future<Address> createAddress(Address address);

  /// Update existing address
  ///
  /// Updates an existing address identified by its name (ID).
  Future<Address> updateAddress(Address address);

  /// Delete address
  ///
  /// Deletes an address by its name (ID).
  Future<void> deleteAddress(String name);

  /// Set address as default
  ///
  /// Marks the specified address as default and unmarks others.
  Future<void> setDefaultAddress(String name);
}
