import { ExportFormat, ExportParams } from '@toolbox-web/grid/plugins/export'; export type { _Augmentation as _ExportAugmentation } from '@toolbox-web/grid/features/export'; /** * Export methods returned from useGridExport. */ export interface ExportMethods { /** * Export grid data to CSV file. * @param filename - Optional filename (defaults to 'export.csv') * @param params - Optional export parameters */ exportToCsv: (filename?: string, params?: Partial) => void; /** * Export grid data to Excel file (XML Spreadsheet format). * @param filename - Optional filename (defaults to 'export.xlsx') * @param params - Optional export parameters */ exportToExcel: (filename?: string, params?: Partial) => void; /** * Export grid data to JSON file. * @param filename - Optional filename (defaults to 'export.json') * @param params - Optional export parameters */ exportToJson: (filename?: string, params?: Partial) => void; /** * Check if an export is currently in progress. */ isExporting: () => boolean; /** * Get information about the last export. */ getLastExport: () => { format: ExportFormat; timestamp: Date; } | null; } /** * Hook for programmatic export control. * * Must be used within a DataGrid component tree with the export feature enabled. * * @example * ```tsx * import { useGridExport } from '@toolbox-web/grid-react/features/export'; * * function ExportToolbar() { * const { exportToCsv, exportToExcel, exportToJson, isExporting } = useGridExport(); * * return ( *
* * * *
* ); * } * ``` * @param selector - Optional CSS selector to target a specific grid element via * DOM query instead of using React context. Use when the component contains * multiple grids, e.g. `'tbw-grid.primary'` or `'#my-grid'`. */ export declare function useGridExport(selector?: string): ExportMethods; //# sourceMappingURL=export.d.ts.map