import { type NotificationPreferenceEntity } from '../entities/notification-preference.entity';
import { type NotificationChannel } from '../value-objects/notification-channel.vo';

export const NOTIFICATION_PREFERENCE_REPOSITORY = Symbol('NOTIFICATION_PREFERENCE_REPOSITORY');

export interface INotificationPreferenceRepository {
  findByUserId(userId: string): Promise<NotificationPreferenceEntity[]>;
  isEnabled(userId: string, channel: NotificationChannel, eventType: string): Promise<boolean>;
  upsert(
    userId: string,
    channel: NotificationChannel,
    eventType: string,
    enabled: boolean,
  ): Promise<NotificationPreferenceEntity>;
}
