import { generateCustomId } from "./generate-client-options.js";
//#region src/v2/blocks/operation-code-sample/helpers/get-clients.ts
/**
* Merges custom code samples with the client options
*
* @param customCodeSamples - The custom code samples from the operation to merge with the client options
* @param clientOptions - The client options to merge with the custom code samples
* @returns A list of client option groups
*/
var getClients = (customCodeSamples, clientOptions) => {
	if (customCodeSamples.length) return [{
		label: "Code Examples",
		key: "custom",
		options: customCodeSamples.map((sample) => {
			const id = generateCustomId(sample);
			const label = sample.label || sample.lang || id;
			return {
				id,
				lang: sample.lang || "plaintext",
				title: label,
				label,
				clientKey: "custom"
			};
		})
	}, ...clientOptions];
	return clientOptions;
};
//#endregion
export { getClients };

//# sourceMappingURL=get-clients.js.map