/** Visibility levels matching @donotdev/core */
type Visibility = 'guest' | 'user' | 'admin' | 'technical' | 'hidden' | 'owner';
/**
 * Determines if a field should be visible based on its visibility setting
 * and the user's authentication/admin status.
 *
 * Visibility levels:
 * - 'guest': Always visible (even to unauthenticated users)
 * - 'user': Visible to authenticated users (users see both guest and user fields)
 * - 'admin': Visible only to admins
 * - 'technical': Visible to admins only (shown as read-only in edit forms)
 * - 'hidden': Never visible (passwords, tokens, API keys - only in DB)
 * - 'owner': Visible only when uid matches one of entity.ownership.ownerFields (requires document context; here treated as not visible for aggregate)
 * - undefined: Defaults to 'user' behavior (visible to authenticated users)
 *
 * @param key - The name (key) of the field.
 * @param visibility - The visibility setting.
 * @param isAdmin - Whether the current user is an admin.
 * @param isAuthenticated - Whether the current user is authenticated (defaults to true for backward compat).
 * @returns True if the field should be visible, false otherwise.
 *
 * @version 0.1.0
 * @since 0.0.1
 * @author AMBROISE PARK Consulting
 */
export declare function isFieldVisible(key: string, visibility: Visibility | undefined, isAdmin: boolean, isAuthenticated?: boolean): boolean;
/**
 * Extracts the names of all fields from a Valibot object schema that should be visible
 * based on the user's administrative status and the visibility rules defined in the schema.
 *
 * @param schema - The Valibot schema, expected to be an object schema (v.object).
 * @param isAdmin - Whether the current user is an admin.
 * @returns An array of strings, where each string is the name of a visible field.
 * Returns an empty array if the schema is not an object schema or has no entries.
 *
 * @version 0.1.0
 * @since 0.0.1
 * @author AMBROISE PARK Consulting
 */
export declare function getVisibleFields(schema: any, // Accept any Valibot type, but process only objects
isAdmin: boolean): string[];
/**
 * Filters the fields of a data object based on visibility rules defined
 * in a Valibot schema and the user's admin status.
 *
 * @template T - The expected type of the data object.
 * @param {T | null | undefined} data - The document data object to filter.
 * @param {any} schema - The Valibot schema defining the structure and field visibility.
 * Expected to be a v.object schema with entries property.
 * @param {boolean} isAdmin - Whether the current user has administrative privileges.
 * @returns {Partial<T>} A new object containing only the fields visible to the user,
 * or an empty object if input data is null/undefined.
 */
export declare function filterVisibleFields<T extends Record<string, any>>(data: T | null | undefined, schema: any, // Use any for broader compatibility
isAdmin: boolean): Partial<T>;
export {};
