// API Endpoints Configuration
// Based on routes defined in SAT_backend/src/index.js

// Google OAuth
const GOOGLE_CLIENT_ID = "932347645492-2bl00q52tkh3sd8mc5bq1p7kqrarp2gc.apps.googleusercontent.com";
const GOOGLE_AUTH_URL = "/api/master/auth/google";
const GOOGLE_LOGIN_URL = "/api/master/auth/google/token";

// Health Check
const HEALTH_URL = "/api/sat/health";

// Authentication — Master Dashboard unified auth
const LOGIN_URL = "/api/master/auth/login";

// Account Management
const ACCOUNT_STATUS_URL = "/api/sat/account-status";

// User Management
const USERS_URL = "/api/sat/users";
const ROLES_URL = "/api/sat/roles";
const DEPARTMENTS_URL = "/api/sat/departments";
const COUNTRY_URL = "/api/sat/countries";

// Audit Management
const AUDITS_URL = "/api/sat/audits";
const AUDIT_STATUS_URL = "/api/sat/audit-status";
const EXTERNAL_AUDITORS_URL = "/api/sat/external-auditors";
const AUDIT_LOGS_URL = "/api/sat/audits/logs";
const AUDIT_LOGS_JOINED_URL = "/api/sat/audits/logs/joined";

// Form Management
const FORMS_URL = "/api/sat/forms";
const FORMS_FOR_SELECTION_URL = "/api/sat/forms/for-selection"; // Excludes archived (parent) forms
const FORMS_LOGS_URL = "/api/sat/forms/logs"; // Sub-API: insert into form_logs (body: form_id, user_id, action)
const FORMS_TYPE_URL = "/api/sat/forms-type";
const SUBMISSIONS_URL = "/api/sat/submissions";

// Question Management
const QUESTIONS_URL = "/api/sat/questions";
const QUESTION_TYPE_URL = "/api/sat/question-type";

// Ticket Management
const TICKETS_URL = "/api/sat/tickets";
const TICKETS_STATUS_URL = "/api/sat/tickets-status";
const TICKETS_TYPE_URL = "/api/sat/tickets-type";

// Location Management
const LOCATIONS_URL = "/api/sat/locations";

// RPN (Risk Priority Number) Management
const RPN_LIKELIHOOD_URL = "/api/sat/rpn/likelihood";
const RPN_SEVERITY_URL = "/api/sat/rpn/severity";

// Dashboard
const DASHBOARD_STATS_URL = "/api/sat/dashboard/stats";
const DASHBOARD_AUDIT_TRENDS_URL = "/api/sat/dashboard/audit-trends";
const CRITICAL_FINDINGS_AUDITS_URL = "/api/sat/dashboard/audits-rpn-critical";
const DASHBOARD_HARM_DISTRIBUTIONS_URL = "/api/sat/dashboard/harm-distributions";
const DASHBOARD_RPN_AUDIT_COUNTS_URL = "/api/sat/dashboard/rpn-audit-counts";
const DASHBOARD_RPN_AUDITS_BY_VALUE_URL = "/api/sat/dashboard/rpn-audits"; // append /:rpnValue
const DASHBOARD_OBSERVATIONS_OPEN_CLOSED_URL = "/api/sat/dashboard/observations-open-closed";
const DASHBOARD_OBSERVATIONS_OPEN_CLOSED_LIST_URL = "/api/sat/dashboard/observations-open-closed-list";
const DASHBOARD_SIO_OIO_CA_STATS_URL = "/api/sat/dashboard/sio-oio-ca-stats";
const DASHBOARD_SIO_OIO_CA_LIST_URL = "/api/sat/dashboard/sio-oio-ca-list";
const DASHBOARD_HARM_SEVERITY_AUDITS_URL = "/api/sat/dashboard/harm-severity-audits";
const DASHBOARD_HARM_LIKELIHOOD_AUDITS_URL = "/api/sat/dashboard/harm-likelihood-audits";

// Activity Log (real-time from backend logs)
const ACTIVITY_LOG_URL = "/api/sat/activity-log";

// Audit Scheduling
const AUDIT_SCHEDULES_URL = "/api/sat/audit-schedules";

// AI (Ollama) - fill observation questions from image
const AI_FILL_FROM_IMAGE_URL = "/api/sat/ai/fill-from-image";

// Export all endpoints
export {
    GOOGLE_CLIENT_ID,
    GOOGLE_LOGIN_URL,
    HEALTH_URL,
    LOGIN_URL,
    ACCOUNT_STATUS_URL,
    USERS_URL,
    ROLES_URL,
    DEPARTMENTS_URL,
    COUNTRY_URL,
    AUDITS_URL,
    AUDIT_STATUS_URL,
    EXTERNAL_AUDITORS_URL,
    AUDIT_LOGS_URL,
    AUDIT_LOGS_JOINED_URL,
    FORMS_URL,
    FORMS_FOR_SELECTION_URL,
    FORMS_LOGS_URL,
    FORMS_TYPE_URL,
    SUBMISSIONS_URL,
    QUESTIONS_URL,
    QUESTION_TYPE_URL,
    TICKETS_URL,
    TICKETS_STATUS_URL,
    TICKETS_TYPE_URL,
    LOCATIONS_URL,
    RPN_LIKELIHOOD_URL,
    RPN_SEVERITY_URL,
    DASHBOARD_STATS_URL,
    DASHBOARD_AUDIT_TRENDS_URL,
    CRITICAL_FINDINGS_AUDITS_URL,
    DASHBOARD_HARM_DISTRIBUTIONS_URL,
    DASHBOARD_RPN_AUDIT_COUNTS_URL,
    DASHBOARD_RPN_AUDITS_BY_VALUE_URL,
    DASHBOARD_OBSERVATIONS_OPEN_CLOSED_URL,
    DASHBOARD_OBSERVATIONS_OPEN_CLOSED_LIST_URL,
    DASHBOARD_SIO_OIO_CA_STATS_URL,
    DASHBOARD_SIO_OIO_CA_LIST_URL,
    DASHBOARD_HARM_SEVERITY_AUDITS_URL,
    DASHBOARD_HARM_LIKELIHOOD_AUDITS_URL,
    ACTIVITY_LOG_URL,
    AUDIT_SCHEDULES_URL,
    AI_FILL_FROM_IMAGE_URL
};