import { useState } from "react";
export var paginationBaseConfig = { pageIndex: 1, pageSize: 10 };
function getTableBaseConfig() {
    return {
        tableInstance: {},
        paginationData: paginationBaseConfig,
    };
}
export function useTableConfig(initialValue) {
    var _a;
    var _b = useState(initialValue !== null && initialValue !== void 0 ? initialValue : getTableBaseConfig()), tableConfig = _b[0], setTableConfig = _b[1];
    return {
        table: tableConfig,
        paginationData: (_a = tableConfig.paginationData) !== null && _a !== void 0 ? _a : paginationBaseConfig,
        setTableConfig: setTableConfig,
    };
}
