import 'package:flutter_riverpod/flutter_riverpod.dart';

class TenantState {
  final String? tenantId;
  final String? tenantName;
  TenantState({this.tenantId, this.tenantName});
}

class TenantNotifier extends StateNotifier<TenantState> {
  TenantNotifier() : super(TenantState());

  void setTenant(String id, String name) {
    state = TenantState(tenantId: id, tenantName: name);
  }

  void clear() {
    state = TenantState();
  }
}

final tenantProvider = StateNotifierProvider<TenantNotifier, TenantState>(
  (ref) => TenantNotifier(),
);
