import type { ClientOption, ClientOptionGroup } from '../../../../v2/blocks/scalar-request-example-block/types';
import type { AvailableClients } from '@scalar/snippetz';
/**
 * Finds and returns the appropriate client option from a list of client option groups.
 *
 * This function is used to determine which client should be initially selected in the
 * request example block. It prioritizes a specific client ID if provided, otherwise
 * falls back to the first available option.
 *
 * @param options - Array of client option groups, each containing a label and array of client options
 * @param id - Optional client identifier to search for (e.g., 'js/fetch', 'python/requests')
 *
 * @returns The selected client option. If a specific ID is provided and found, returns that client.
 *          If the ID is not found or not provided, returns the first available client option.
 *
 * @example
 * ```typescript
 * const clientGroups = [
 *   {
 *     label: 'JavaScript',
 *     options: [
 *       { id: 'js/fetch', label: 'Fetch API', lang: 'js' },
 *       { id: 'js/axios', label: 'Axios', lang: 'js' }
 *     ]
 *   }
 * ]
 *
 * // Find specific client
 * const client = findClient(clientGroups, 'js/fetch')
 * // Returns: { id: 'js/fetch', label: 'Fetch API', lang: 'js' }
 *
 * // Find first available client
 * const firstClient = findClient(clientGroups)
 * // Returns: { id: 'js/fetch', label: 'Fetch API', lang: 'js' }
 * ```
 */
export declare const findClient: (clientGroups: ClientOptionGroup[], clientId?: AvailableClients[number] | undefined) => ClientOption;
//# sourceMappingURL=find-client.d.ts.map