'use client'
import {
  __export
} from "./chunk-JUBOAWNR.mjs";

// src/endpoints/m2m-notifications.v1.ts
var m2m_notifications_v1_exports = {};
__export(m2m_notifications_v1_exports, {
  findMySubscriptions: () => findMySubscriptions,
  findNotificationsByServiceId: () => findNotificationsByServiceId,
  healthCheck: () => healthCheck,
  m2mNotifications_v1: () => m2mNotifications_v1,
  registerNotification: () => registerNotification,
  root: () => root,
  saveSubscription: () => saveSubscription,
  updateNotificationStatus: () => updateNotificationStatus
});
var root = () => {
  let __root = "";
  if (globalThis.M2M_COMPONENTS_ENV === "local") {
    __root = "";
  }
  if (globalThis.M2M_COMPONENTS_ENV === "localDev") {
    __root = "";
  }
  if (globalThis.M2M_COMPONENTS_ENV === "development") {
    __root = "https://api-notifications.dev.m2msystems.cloud";
  }
  if (globalThis.M2M_COMPONENTS_ENV === "production") {
    __root = "https://api-notifications.m2msystems.cloud";
  }
  return __root;
};
var healthCheck = () => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`health_check`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var registerNotification = () => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`notifications`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var findNotificationsByServiceId = ({ id }) => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`notifications/by_service_id/${id}`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var updateNotificationStatus = ({ id }) => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`notifications/${id}`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var saveSubscription = () => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`subscriptions`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var findMySubscriptions = () => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`subscriptions`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var m2mNotifications_v1 = {
  healthCheck,
  registerNotification,
  findNotificationsByServiceId,
  updateNotificationStatus,
  saveSubscription,
  findMySubscriptions
};

export {
  root,
  healthCheck,
  registerNotification,
  findNotificationsByServiceId,
  updateNotificationStatus,
  saveSubscription,
  findMySubscriptions,
  m2mNotifications_v1,
  m2m_notifications_v1_exports
};
//# sourceMappingURL=chunk-ISOF65DB.mjs.map