import { VisitorDataType, CompoundField, FieldNode, FieldByType, PrimitiveField, RecordField, TupleField, VariantField } from "./types.js";
/**
* Type guard for checking specific field types.
*
* @example
* ```tsx
* function FieldInput({ field }: { field: FieldNode }) {
* if (isFieldType(field, 'record')) {
* // field is now typed as RecordField
* return
* }
* if (isFieldType(field, 'text')) {
* // field is now typed as TextField
* return
* }
* // ...
* }
* ```
*/
export declare function isFieldType(field: FieldNode, type: T): field is FieldByType;
/**
* Check if a field is a compound type (contains other fields).
* Compound types: record, variant, tuple, optional, vector, recursive
*/
export declare function isCompoundField(field: FieldNode): field is CompoundField;
/**
* Check if a field is a primitive type.
* Primitive types: principal, number, text, boolean, null
*/
export declare function isPrimitiveField(field: FieldNode): field is PrimitiveField;
/**
* Check if a field has child fields array (for iteration).
* Applies to: record (fields), tuple (fields)
*/
export declare function hasChildFields(field: FieldNode): field is RecordField | TupleField;
/**
* Check if a field has variant options (for iteration).
* Applies to: variant (options)
*/
export declare function hasOptions(field: FieldNode): field is VariantField;
/**
* Format a raw Candid label into a human-readable display label.
* Handles common patterns like "__arg0", "_0_", "snake_case", etc.
*
* @example
* ```ts
* formatLabel("__arg0") // "Arg 0"
* formatLabel("_0_") // "Item 0"
* formatLabel("created_at") // "Created At"
* formatLabel("userAddress") // "User Address"
* formatLabel("__ret0") // "Result 0"
* ```
*/
export declare function formatLabel(label: string): string;
//# sourceMappingURL=helpers.d.ts.map