import { ColumnOrderState, Table } from '@tanstack/react-table'; interface PersistColumnOrderLoad { /** The order this render's key has saved, as `usePersistedColumnOrder` read it; `undefined` when nothing valid is saved. */ saved?: ColumnOrderState; /** The table's own order (`initialState.columnOrder`), which a table opens with ahead of a saved one. */ defaultOrder?: ColumnOrderState; /** The app owns `state.columnOrder`: a key change blocks writes but does not set the order itself. */ controlled?: boolean; } /** * Saves the column order under `key` when it changes. An order that is `[]` or that matches the live * definition order removes the entry instead (ASMA-8597, REQ-004), so a table the user has put back to its * defaults stores nothing. Mounting never writes. A table with no key does no work per render (ASMA-8698), and whether the * order is the default is worked out only when it is about to be saved. * * When `key` changes on a table that stays mounted (one table, a key per tab), the new key's order is loaded into the * table in a layout effect, so the old order is never painted under the new key (ASMA-8698). It is the order a fresh * mount with that key would open with: the table's own `defaultOrder` when it has one, else the saved one, else `[]`. * Nothing is written or removed under the new key until the order is the loaded one, and the old key's entry is never * touched. When the key goes away the table goes back to its default and writes nothing. */ export declare function usePersistColumnOrder(table: Table, key?: string | null, load?: PersistColumnOrderLoad): void; export {};