import 'package:krow_domain/krow_domain.dart' as domain;

class ClientBusinessSession {
  final String id;
  final String businessName;
  final String? email;
  final String? city;
  final String? contactName;
  final String? companyLogoUrl;

  const ClientBusinessSession({
    required this.id,
    required this.businessName,
    this.email,
    this.city,
    this.contactName,
    this.companyLogoUrl,
  });
}

class ClientSession {
  final domain.User user;
  final String? userPhotoUrl;
  final ClientBusinessSession? business;

  const ClientSession({
    required this.user,
    required this.userPhotoUrl,
    required this.business,
  });
}

class ClientSessionStore {
  ClientSession? _session;

  ClientSession? get session => _session;

  void setSession(ClientSession session) {
    _session = session;
  }

  void clear() {
    _session = null;
  }

  static final ClientSessionStore instance = ClientSessionStore._();

  ClientSessionStore._();
}
