'use client'
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// 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
});
module.exports = __toCommonJS(m2m_notifications_v1_exports);
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
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  findMySubscriptions,
  findNotificationsByServiceId,
  healthCheck,
  m2mNotifications_v1,
  registerNotification,
  root,
  saveSubscription,
  updateNotificationStatus
});
//# sourceMappingURL=m2m-notifications.v1.js.map