import 'package:meta/meta.dart';
import 'package:satu/core/models/flow/dao/product_dao.dart';
import 'package:satu/core/models/flow/transaction_state.dart';

@immutable
class SellState {
  factory SellState.initial() => SellState(
        items: [],
        transactionState: TransactionState(),
      );

  SellState({this.items, this.transactionState});

  final List<ProductDao>? items;
  final TransactionState? transactionState;

  SellState copyWith(
      {required List<ProductDao>? items,
      required TransactionState? transactionState}) {
    return SellState(
        items: items ?? this.items,
        transactionState: transactionState ?? this.transactionState);
  }
}
