import type { Type } from '../types'; import type { ZValues, ZVariant } from './values'; export declare function changeKeyAndType(values: ZValues, oldKeyName: string, newKeyName: string, type: Type): ZValues; type ValuesByType = { value: any; uuid: string; priority: number; }; export declare function getSortedValuesByType(values: ZValues): Map; /** * Given a uuid of an existing variant alongside a direction, shifts the priority of the variant in the direction. * @param values The values to mutate * @param uuid The uuid of the variant to shift * @param direction The direction to shift the variant in * @returns The mutated values * @note The variant must exist in the values. * @note The variant's priority will never be less than 1 as this is reserved for the default variant. * @note the priority of the default variant will never change from 0. */ export declare function shiftPriorityLeftOrRightByUUID(values: ZValues, uuid: string, direction: 'left' | 'right'): ZValues; /** * * @param values The values to mutate. * @param keyName The key to delete. * @returns The mutated values. */ export declare function deleteKeyFromValues(values: ZValues, keyName: string): ZValues; /** * * @param values The values to mutate. * @param uuid The uuid of the variant to shift. * @param direction The direction to shift the variant in. * @returns The mutated values. */ export declare function canShiftPriorityLeftOrRightByUUID(values: ZValues, uuid: string, direction: 'left' | 'right'): boolean; /** * * @param values The values to mutate. * @param value The value to set. * @param key The key to add the value to. * @returns The mutated values. */ export declare function setDefaultValueForKey(values: ZValues, value: any, key: string): ZValues; /** * Get the default value for a key. * @param values The values to get the default value from. * @param key The key to get the default value for. * @returns The default value for the key, or undefined if no default value is set. */ export declare function getDefaultValueForKey(values: ZValues, key: string): any; /** * Get a set of default values by key. * @param values The values to get the default values from. * @returns The default values by key. */ export declare function getDefaultValuesByKey(values: ZValues): Map; /** * @param values The values to parse. * @returns A map of key names to their type representations. */ export declare function getTypesByKey(values: ZValues): Map; /** * * @param values The values to check. * @returns Returns a map of key names to their [type representations, default values]. */ export declare function getTypesAndDefaultsByKey(values: ZValues): Map; /** * Adds a new key to the values. * @param keyname The name of the key. * @param type The type of the key. * @param values The values to add the key to. * @returns The new values. */ export declare function addNewKeyToValues(keyname: string, type: Type, values: ZValues): ZValues; /** * Inserts a new key containing a default value into the values. * @param keyname The name of the key. * @param type The type of the key. * @param values The values to add the key to. * @param defaultValue The default value to set for the key. * @returns The new values. */ export declare function addNewKeyToValuesWithDefaultValue(keyname: string, type: Type, values: ZValues, defaultValue: any): ZValues; /** * Add a new variant to the values. * @param uuid The uuid of the new variant. * @param variant The variant to add. * @param values The values to add the variant to. * @returns The new values. */ export declare function addNewVariantToValues(values: ZValues, uuid: string, variant: ZVariant): ZValues; /** * Remove a variant from the values * @param uuid The uuid of the variant to remove * @param values The values to remove the variant from * @returns The new values object */ export declare function removeVariantFromValuesByUUID(uuid: string, values: ZValues): ZValues; /** * Returns a new values object with the value overridden. * @param keyname The keyname of the value to override. * @param variantID The variantID of the value to override. * @param value The new value. * @param values The values object to override. * @returns */ export declare function changeValueInValues(keyname: string, uuid: string, value: any, values: ZValues): ZValues; /** * Given a values object, returns a CSV string. * @param values The values to convert to CSV. * @returns A CSV string. */ export declare function ZValuesToCSVString(values: ZValues): string; /** * Merges a provided csv string into the provided values object. * @param csvString The csv string to merge (source) * @param currentValues The values object to merge into (destination) * @returns The new values object. * @notes This can very likely be improved. * @notes I couldn't quite figure out how to do it in a way that was cleaner than this. */ export declare function mergeCSVStringIntoTarget(csvString: string, currentValues: ZValues): ZValues; export {};