import { z } from 'zod'; import type { ItemSchema, MapSchema, Schema, TransformedValue } from '../../../../schema/index.js'; import type { Transformer } from '../../../../transformers/transformer.js'; import type { Extends, If, Or } from '../../../../types/index.js'; import type { SavedAsAttributes } from '../utils.js'; import type { ZodFormatterOptions } from './types.js'; export type ZodLiteralMap[] = []> = LITERALS extends [infer LITERALS_HEAD, ...infer LITERALS_TAIL] ? LITERALS_HEAD extends z.Primitive ? LITERALS_TAIL extends z.Primitive[] ? ZodLiteralMap]> : never : never : RESULTS; export type WithOptional = If, ZOD_SCHEMA, If, Extends>, z.ZodOptional, ZOD_SCHEMA>>; export declare const withOptional: (schema: Schema, { partial, defined }: ZodFormatterOptions, zodSchema: z.ZodTypeAny) => z.ZodTypeAny; export type WithDecoding = If, ZOD_SCHEMA, If, z.ZodEffects, TransformedValue>, ZOD_SCHEMA>>; export declare const withDecoding: (schema: Extract, { transform }: ZodFormatterOptions, zodSchema: z.ZodTypeAny) => z.ZodTypeAny; export type WithAttributeNameDecoding = If, Extends<[SavedAsAttributes], [never]>>, ZOD_SCHEMA, z.ZodEffects, TransformedValue>>; export declare const withAttributeNameDecoding: (schema: MapSchema | ItemSchema, { transform }: ZodFormatterOptions, zodSchema: z.ZodTypeAny) => z.ZodTypeAny; export declare const compileAttributeNameDecoder: (schema: MapSchema | ItemSchema) => (encoded: unknown) => Record;