export interface InlineRowCreationConfig { /** Template for new row data */ template: () => Partial; /** Required fields that must be filled before creation */ requiredFields?: (keyof T)[]; /** Callback when a new row is ready to be created */ onCreateRow?: (data: Partial) => Promise | void; /** Validation function */ validate?: (data: Partial) => { valid: boolean; message?: string; }; } export interface UseInlineRowCreationOptions { config: InlineRowCreationConfig; /** Enable/disable inline creation */ enabled?: boolean; } export interface UseInlineRowCreationResult { /** Current new row data */ newRowData: Partial; /** Update a field in the new row */ updateNewRowField: (field: keyof T, value: unknown) => void; /** Reset new row to template */ resetNewRow: () => void; /** Check if new row is ready to be created (all required fields filled) */ isNewRowReady: boolean; /** Whether creation is in progress */ isCreating: boolean; /** Create the new row (calls onCreateRow) */ createRow: () => Promise; /** Validation errors for the new row */ validationErrors: string[]; /** Whether inline creation is enabled */ enabled: boolean; } /** * Hook for managing inline row creation in spreadsheets * * @example * ```tsx * const { newRowData, updateNewRowField, createRow, isNewRowReady } = useInlineRowCreation({ * config: { * template: () => ({ name: '', email: '' }), * requiredFields: ['name'], * onCreateRow: async (data) => { * await api.createItem(data); * refreshData(); * } * } * }); * ``` */ export declare function useInlineRowCreation>(options: UseInlineRowCreationOptions): UseInlineRowCreationResult; export default useInlineRowCreation; //# sourceMappingURL=useInlineRowCreation.d.ts.map