import '../services/mbti_types.dart';

// part 'mbti_result.g.dart'; // Future-proofing for Hive adapter

class MBTIResult {
  final MBTIType type;
  final int sampleSize; // Number of items used for diagnosis
  final double confidence; // 0.0 - 1.0
  final Map<String, bool> axisScores; // 'E/I', 'S/N', 'T/F', 'J/P' -> true for Left(E,S,T,J), false for Right

  const MBTIResult({
    required this.type,
    required this.sampleSize,
    required this.confidence,
    required this.axisScores,
  });

  bool get isInsufficient => sampleSize < 5;

  factory MBTIResult.insufficient(int sampleSize) {
    return MBTIResult(
      type: MBTIType.unknown(),
      sampleSize: sampleSize,
      confidence: 0.0,
      axisScores: {},
    );
  }
}
