import 'package:recording_tool/features/recording/model/model_recording_context.dart';
import 'package:recording_tool/features/recording/model/model_recording_session.dart';

class RecordingModel {
  /// 从赛事项进入录制页时传入的录制上下文。
  final RecordingContext recordingContext;

  /// 录制会话状态
  final RecordingSessionState session;

  RecordingModel({
    required this.recordingContext,
    this.session = const RecordingSessionState(),
  });

  bool get isRecording => session.isRecording;

  RecordingModel copyWith({
    RecordingContext? recordingContext,
    RecordingSessionState? session,
  }) {
    return RecordingModel(
      recordingContext: recordingContext ?? this.recordingContext,
      session: session ?? this.session,
    );
  }
}
