import * as admin from "firebase-admin";
import {setGlobalOptions} from "firebase-functions/v2";

// Initialize functions preferred region (replaced by kasy at project generation)
setGlobalOptions({region: "europe-west1"});

admin.initializeApp();

// authentications
exports.authTriggers = require("./authentication/triggers");
exports.authFunctions = require("./authentication/functions");

// notifications
exports.notificationsTriggers = require("./notifications/triggers");
exports.notificationsFunctions = require("./notifications/admin_functions");
exports.deviceTriggers = require("./notifications/device_triggers");

// subscriptions
exports.subscriptions = require("./subscriptions/subscriptions_functions");
exports.subscriptionTriggers = require("./subscriptions/triggers");

// feature requests: vote counter updated atomically by client (WriteBatch)

// llm chat proxy (activated when withLlmChat = true)
exports.llmChat = require("./llm_chat").llmChat;
