import 'package:krow_domain/krow_domain.dart';

// TODO: Implement BusinessRepositoryInterface once defined in a feature package.
class BusinessRepositoryMock {
  Future<Business?> getBusiness(String id) async {
    await Future.delayed(const Duration(milliseconds: 300));
    return const Business(
      id: 'biz_1',
      name: 'Acme Events Ltd',
      registrationNumber: 'REG123456',
      status: BusinessStatus.active,
      avatar: 'https://via.placeholder.com/150',
    );
  }

  Future<List<Hub>> getHubs(String businessId) async {
    await Future.delayed(const Duration(milliseconds: 300));
    return <Hub>[
      const Hub(
        id: 'hub_1',
        businessId: 'biz_1',
        name: 'London HQ',
        address: '123 Oxford Street, London',
        status: HubStatus.active,
      ),
    ];
  }

  Future<Hub> createHub({
    required String businessId,
    required String name,
    required String address,
  }) async {
    await Future.delayed(const Duration(milliseconds: 500));
    return Hub(
      id: 'hub_${DateTime.now().millisecondsSinceEpoch}',
      businessId: businessId,
      name: name,
      address: address,
      status: HubStatus.active,
    );
  }

  Future<void> deleteHub(String id) async {
    await Future.delayed(const Duration(milliseconds: 300));
  }

  Future<void> assignNfcTag({
    required String hubId,
    required String nfcTagId,
  }) async {
    await Future.delayed(const Duration(milliseconds: 500));
  }
}
