'use strict';

function formsListDiscriminator(params) {
  return {
    status: params?.status,
    limit: params?.limit ?? 20,
    offset: params?.offset ?? 0
  };
}
function submissionsListDiscriminator(params) {
  return {
    formId: params.formId,
    limit: params.limit ?? 20,
    offset: params.offset ?? 0
  };
}
const FORM_QUERY_KEYS = {
  /**
   * Key for forms.list(params) query.
   * Full key: ["forms", "list", "list", { status, limit, offset }]
   */
  formsList: (params) => ["forms", "list", "list", formsListDiscriminator(params)],
  /**
   * Key for forms.byId(id) query.
   * Full key: ["forms", "byId", "byId", id]
   */
  formById: (id) => ["forms", "byId", "byId", id],
  /**
   * Key for formSubmissions.list(params) query.
   * Full key: ["formSubmissions", "list", { formId, limit, offset }]
   */
  submissionsList: (params) => ["formSubmissions", "list", submissionsListDiscriminator(params)]
};

exports.FORM_QUERY_KEYS = FORM_QUERY_KEYS;
exports.formsListDiscriminator = formsListDiscriminator;
exports.submissionsListDiscriminator = submissionsListDiscriminator;
