/** * Script generation utilities * Generates import statements and configuration for selected c15t scripts */ /** * Code-generation snippet for one built-in script integration. */ interface ScriptSnippet { /** Named export of the `@c15t/integrations/` module. */ importName: string; /** * Example call with the vendor's real required options. A multi-line * example indents with tabs from column 0; generation re-indents it. */ example: string; } /** * Canonical import names and example calls for every built-in integration, * keyed by package subpath. The naive camelCase + `{ id }` template produced * broken output for most vendors (wrong export names like `microsoftClarity` * instead of `clarity`, and wrong option names like `id` instead of * `writeKey`), so each vendor declares its snippet explicitly. * * `scripts-snippets.test.ts` fails when a registry vendor is missing here. */ export declare const SCRIPT_SNIPPETS: Record; /** * Converts a script name to camelCase for import usage. Fallback for scripts * without a snippet entry; prefer {@link SCRIPT_SNIPPETS}. * * @param scriptName - The script name (e.g., 'google-tag-manager') * @returns The camelCase version (e.g., 'googleTagManager') */ export declare function toCamelCase(scriptName: string): string; /** * Generates the import statements for selected scripts * Each script uses a subpath import from @c15t/integrations * * @param selectedScripts - Array of script names to import * @returns The import statements string, or empty string if no scripts * * @example * ```ts * generateScriptsImport(['google-tag-manager', 'microsoft-clarity']); * // Returns: * // "import { googleTagManager } from '@c15t/integrations/google-tag-manager'; * // import { clarity } from '@c15t/integrations/microsoft-clarity';" * ``` */ export declare function generateScriptsImport(selectedScripts: string[]): string; /** * Generates the scripts configuration array for `ConsentProvider` options. * * @param selectedScripts - Array of script names to configure * @returns The scripts configuration string, or empty string if no scripts * * @remarks * Each script is rendered with its real required option names and placeholder * values for the user to replace. * * @example * ```ts * generateScriptsConfig(['google-tag-manager', 'segment']); * // Returns: * // "scripts: [ * // googleTagManager({ id: 'GTM-XXXXXX' }), * // segment({ writeKey: 'YOUR_WRITE_KEY' }), * // ]," * ``` */ export declare function generateScriptsConfig(selectedScripts: string[]): string; /** Generates an array expression for framework adapters with a scripts prop. */ export declare function generateScriptsArrayValue(selectedScripts: string[], indentation?: string): string; /** * Generates a comment block showing example script configuration * Used when no scripts are selected but user might want to add them later * * @returns A comment block with example script usage */ export declare function generateScriptsCommentPlaceholder(): string; export {};