import { useCallback, useState } from 'react';
export function useToggleTableFeatures(features) {
    const [tableFeatures, setTableFeatures] = useState(features ?? {});
    const changeTableFeatures = useCallback((propName)=>{
        const key = propName;
        setTableFeatures({
            ...tableFeatures,
            [key]: !tableFeatures[key]
        });
    }, [
        tableFeatures,
        setTableFeatures
    ]);
    return {
        changeTableFeatures,
        tableFeatures
    };
}
