'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/matsuri-forms.v1.ts
var matsuri_forms_v1_exports = {};
__export(matsuri_forms_v1_exports, {
  formActivateSheetFeature: () => formActivateSheetFeature,
  formCreate: () => formCreate,
  formFindAll: () => formFindAll,
  formGet: () => formGet,
  formGetByRevision: () => formGetByRevision,
  formPublish: () => formPublish,
  formPublishStatusChangeToPrivate: () => formPublishStatusChangeToPrivate,
  formQuestionCreate: () => formQuestionCreate,
  formQuestionDelete: () => formQuestionDelete,
  formQuestionInsert: () => formQuestionInsert,
  formQuestionUpdate: () => formQuestionUpdate,
  formUpdate: () => formUpdate,
  formsCreateNewRevision: () => formsCreateNewRevision,
  guestFormGet: () => guestFormGet,
  healthCheck: () => healthCheck,
  matsuriForms_v1: () => matsuriForms_v1,
  root: () => root,
  signInWithGoogle: () => signInWithGoogle,
  signUpWithGoogle: () => signUpWithGoogle,
  submissionCreate: () => submissionCreate,
  submissionGet: () => submissionGet
});
module.exports = __toCommonJS(matsuri_forms_v1_exports);
var root = () => {
  let __root = "";
  if (globalThis.M2M_COMPONENTS_ENV === "local") {
    __root = "http://localhost:8080";
  }
  if (globalThis.M2M_COMPONENTS_ENV === "localDev") {
    __root = "";
  }
  if (globalThis.M2M_COMPONENTS_ENV === "development") {
    __root = "https://api-forms.dev.m2msystems.cloud";
  }
  if (globalThis.M2M_COMPONENTS_ENV === "production") {
    __root = "https://api-forms.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 formGet = ({ id }) => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`forms/${id}`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var formGetByRevision = ({
  id,
  revision
}) => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`forms/${id}/${revision}`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var formCreate = () => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`forms`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var formFindAll = () => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`forms`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var formUpdate = ({ id }) => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`forms/${id}`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var formActivateSheetFeature = ({ id }) => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`forms/${id}/sheets/activate`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var formPublishStatusChangeToPrivate = ({ id }) => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`forms/${id}/private`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var formsCreateNewRevision = ({ id }) => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`forms/${id}`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var formPublish = ({ id }) => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`forms/${id}/publish`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var formQuestionCreate = ({ formId }) => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`forms/${formId}/questions/append`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var formQuestionInsert = ({ formId }) => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`forms/${formId}/questions/insert`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var formQuestionDelete = ({ formId }) => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`forms/${formId}/questions/delete`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var formQuestionUpdate = ({
  formId,
  questionId
}) => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`forms/${formId}/questions/${questionId}`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var submissionGet = ({ formId }) => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`forms/${formId}/submissions`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var submissionCreate = () => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`submissions`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var guestFormGet = ({ formId }) => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`guest/forms/${formId}`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var signInWithGoogle = () => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`auth/signInWithGoogle`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var signUpWithGoogle = () => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`auth/signUpWithGoogle`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var matsuriForms_v1 = {
  healthCheck,
  formGet,
  formGetByRevision,
  formCreate,
  formFindAll,
  formUpdate,
  formActivateSheetFeature,
  formPublishStatusChangeToPrivate,
  formsCreateNewRevision,
  formPublish,
  formQuestionCreate,
  formQuestionInsert,
  formQuestionDelete,
  formQuestionUpdate,
  submissionGet,
  submissionCreate,
  guestFormGet,
  signInWithGoogle,
  signUpWithGoogle
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  formActivateSheetFeature,
  formCreate,
  formFindAll,
  formGet,
  formGetByRevision,
  formPublish,
  formPublishStatusChangeToPrivate,
  formQuestionCreate,
  formQuestionDelete,
  formQuestionInsert,
  formQuestionUpdate,
  formUpdate,
  formsCreateNewRevision,
  guestFormGet,
  healthCheck,
  matsuriForms_v1,
  root,
  signInWithGoogle,
  signUpWithGoogle,
  submissionCreate,
  submissionGet
});
//# sourceMappingURL=matsuri-forms.v1.js.map