import 'package:domain/entity/service_order_detail_entity.dart';
import 'package:widgets/load_state_layout.dart';

class ServicePaySuccessState {
  //页面 LoadView 状态的展示
  LoadState loadingState;
  String? errorMessage;
  double? totalPrice;
  ServiceOrderDetailEntity? datas;


  ServicePaySuccessState({
    this.loadingState = LoadState.State_Loading,
    String? errorMessage,
    double? totalPrice,
    Map<String, Map<String, dynamic>>? cancelFormData,
    this.datas,
  }):totalPrice = totalPrice ?? 0.0;

  ServicePaySuccessState copyWith({
    LoadState? loadingState,
    String? errorMessage,
    double? totalPrice,
    List<Map<String, dynamic>>? actionBtnList,
    String? cancelReason,
    Map<String, Map<String, dynamic>>? cancelFormData,
    ServiceOrderDetailEntity? datas,
  }) {
    return ServicePaySuccessState(
      loadingState: loadingState ?? this.loadingState,
      errorMessage: errorMessage ?? this.errorMessage,
      totalPrice: totalPrice ?? this.totalPrice,
      datas: datas ?? this.datas,
    );
  }
}