import { Notification } from "@/db/models";
import { isNotificationsMysql } from "@/db/activeDatabase";
import { createNotificationMysql } from "@/db/mysql/notifications";

export async function notifyUser(input: {
  userId: string;
  titleAr: string;
  titleEn: string;
  messageAr: string;
  messageEn: string;
  link?: string;
}) {
  if (isNotificationsMysql()) {
    return createNotificationMysql(input);
  }
  return Notification.create(input);
}
