import type { CamelCase } from 'type-fest';
import type { ScriptLocalization } from '../core/models/api/scriptLocalization';
import type { LocalizedScriptSchema } from '../types/localizedScriptSchema';
/**
 * Takes a {@link ScriptLocalization} and converts it into a schema with matching field names.
 *
 * E.g.
 * ```ts
 * const scriptLocalization = {
 *   script: 'ja-Kana',
 *   fields: {
 *     firstName: 'アレキサンダー',
 *     lastName: 'パトリック',
 *   },
 * } as const;
 *
 * const schema = mapApiScriptLocalizationToSchemaFields(scriptLocalization);
 * console.log(schema);
 * // {
 * //   jaKanaFirstName: 'アレキサンダー',
 * //   jaKanaLastName: 'パトリック'
 * // }
 * ```
 *
 */
export declare function mapApiScriptLocalizationToSchemaFields<ApiType, Script extends string>(localization: ScriptLocalization<ApiType, Script>): LocalizedScriptSchema<ApiType, RemoveHyphenFromScriptName<Script>>;
/**
 * Given a schema and a script, takes the fields prefixed with that script and produces a {@link ScriptLocalization}.
 *
 * E.g.
 * ```ts
 * const schema = {
 *   firstName: 'Alex',
 *   lastName: 'Tompkins',
 *   jaKanaFirstName: 'アレキサンダー',
 *   jaKanaLastName: 'パトリック',
 *   jaHaniFirstName: 'pretend this is hiragana',
 *   jaHaniLastName: 'this too',
 * };
 *
 * const localization = mapSchemaFieldsToApiScriptLocalization(schema, 'jaKana');
 * console.log(localization);
 * // {
 * //   script: 'ja-Kana',
 * //   fields: { firstName: 'アレキサンダー', lastName: 'パトリック' },
 * // };
 * ```
 */
export declare function mapSchemaFieldsToApiScriptLocalization<Schema extends object, Script extends string>(data: Schema, script: Script): ScriptLocalization<PickFieldsStartingWith<Schema, Script>, AddHyphenToScriptName<Script>>;
type RemoveHyphenFromScriptName<Script extends string> = Script extends `${infer Part1}-${infer Part2}` ? `${Part1}${Part2}` : never;
type AddHyphenToScriptName<Script extends string> = Script extends `${infer Letter1}${infer Letter2}${infer Rest}` ? `${Letter1}${Letter2}-${Rest}` : never;
type PickFieldsStartingWith<Schema, Prefix extends string> = {
    [K in keyof Schema as K extends `${Prefix}${infer FieldName}` ? CamelCase<FieldName> : never]: Schema[K];
};
export {};
