import type { CommonDomainErrorKind, DomainError } from '@core/shared/errors/DomainError';

/**
 * Domain Error: NotificationDomainError
 *
 * Implements the shared DomainError contract for notification domain failures.
 */
export class NotificationDomainError extends Error implements DomainError<CommonDomainErrorKind> {
  readonly name = 'NotificationDomainError';
  readonly type = 'domain' as const;
  readonly context = 'notifications';
  readonly kind: CommonDomainErrorKind;
 
  constructor(message: string, kind: CommonDomainErrorKind = 'validation') {
    super(message);
    this.kind = kind;
    Object.setPrototypeOf(this, new.target.prototype);
  }
}