'use client';

import { RadiusT, SizeT } from '../../types';
import { default as React } from 'react';
interface FormContextValue {
    isSubmitting: boolean;
    errors: Record<string, string | string[]>;
    touched: Record<string, boolean>;
    setFieldError: (field: string, error: string | string[] | null) => void;
    setFieldTouched: (field: string, touched?: boolean) => void;
    clearFieldError: (field: string) => void;
    clearAllErrors: () => void;
    hasErrors: boolean;
    getFieldError: (field: string) => string | string[] | null;
    getFieldTouched: (field: string) => boolean;
}
declare const FormContext: React.Context<FormContextValue | null>;
export interface FormWrapperProps {
    /**
     * Form content
     */
    children: React.ReactNode;
    /**
     * Form title
     */
    title?: string;
    /**
     * Form subtitle or description
     */
    subtitle?: string;
    desc?: React.ReactNode;
    /**
     * Form header content (overrides title/subtitle)
     */
    header?: React.ReactNode;
    /**
     * Form footer content
     */
    footer?: React.ReactNode;
    /**
     * Whether form is currently submitting
     */
    isSubmitting?: boolean;
    /**
     * Global form error message
     */
    error?: string | null;
    /**
     * Success message
     */
    success?: string | null;
    /**
     * Form submission handler
     */
    onSubmit?: (event: React.FormEvent<HTMLFormElement>) => void | Promise<void>;
    /**
     * Initial field errors
     */
    initialErrors?: Record<string, string | string[]>;
    /**
     * Custom className
     */
    className?: string;
    /**
     * Card variant
     */
    variant?: "default" | "bordered" | "shadow" | "flat";
    /**
     * Card size
     */
    size?: SizeT;
    radius?: RadiusT;
    /**
     * Whether to show the card wrapper
     */
    showCard?: boolean;
    /**
     * Custom card props
     */
    cardProps?: any;
    /**
     * Loading state content
     */
    loadingContent?: React.ReactNode;
    /**
     * Organization logo
     */
    logo?: string | React.ReactNode;
    /**
     * Form width
     */
    width?: "sm" | "md" | "lg" | "xl" | "full";
    /**
     * Center the form
     */
    centered?: boolean;
    /**
     * Disable animations
     */
    disableAnimations?: boolean;
    titleAlignment?: "left" | "center" | "right";
}
export declare function FormWrapper({ children, title, subtitle, desc, header, footer, isSubmitting, error, success, onSubmit, initialErrors, className, variant, size, showCard, cardProps, loadingContent, logo, width, centered, disableAnimations, titleAlignment, }: FormWrapperProps): import("react/jsx-runtime").JSX.Element;
/**
 * Hook to access form context
 */
export declare function useFormContext(): FormContextValue;
/**
 * Hook to manage individual field state (optimized to prevent unnecessary re-renders)
 */
export declare function useFormField(name: string): {
    name: string;
    error: string | string[] | null;
    touched: boolean;
    showError: boolean;
    setError: (error: string | string[] | null) => void;
    setTouched: (touched?: boolean) => void;
    clearError: () => void;
    isSubmitting: boolean;
};
export default FormWrapper;
export { FormContext };
//# sourceMappingURL=form-wrapper.d.ts.map