part of 'selected_outlet_bloc.dart';

@freezed
class SelectedOutletState with _$SelectedOutletState {
  const factory SelectedOutletState({
    /// null berarti "Semua Outlet"
    Outlet? selectedOutlet,
    String? selectedOutletId,
  }) = _SelectedOutletState;

  factory SelectedOutletState.initial() => const SelectedOutletState();
}

extension SelectedOutletStateX on SelectedOutletState {
  bool get isAllOutlets => selectedOutletId == null;

  String get displayName => selectedOutlet?.name ?? 'Semua Outlet';
}
