const CoolifyClient = require('../coolifyClient');

/**
 * Disable a resource (see OpenAPI for required params).
 * @param {string} host_url
 * @param {string} token
 * @param {Object} data - Parameters for disabling the resource.
 * @param {string} data.id - The UUID of the resource to disable. (required)
 * @param {string} [data.type] - The type of resource (e.g., 'application', 'database', etc.).
 * @returns {Promise<Object>}
 * @example
 * disable('https://coolify.example.com', 'TOKEN', { id: 'uuid', type: 'application' });
 */
async function disable(host_url, token, data) {
  const client = new CoolifyClient(host_url, token);
  return client.get('/api/v1/disable', { params: data });
}

module.exports = {
  disable,
};
