import { Styles } from "./defaultStyles"; export type AchievementMetricValue = number | string | boolean | Date; export interface AchievementDetails { achievementId: string; achievementTitle: string; achievementDescription: string; achievementIconKey?: string; } export type AchievementIconRecord = Record; export interface AchievementConfiguration { [metricName: string]: Array>; } export type InitialAchievementMetrics = Record; export type AchievementMetrics = Record; export interface AchievementProviderProps { children: React.ReactNode; config: AchievementConfiguration; initialState?: InitialAchievementMetrics & { previouslyAwardedAchievements?: string[]; }; storageKey?: string; badgesButtonPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'; styles?: Partial; icons?: Record; } export interface AchievementUnlockCondition { isConditionMet: (value: T) => boolean; achievementDetails: AchievementDetails; } export interface SerializedAchievementUnlockCondition { achievementDetails: AchievementDetails; conditionType: 'number' | 'string' | 'boolean' | 'date'; conditionValue: any; } export interface SerializedAchievementConfiguration { [metricName: string]: SerializedAchievementUnlockCondition[]; }