import { useContext, createContext } from "react";

export type ResourceListRowContextType<T = object> = {
    row: T;
};

export const ResourceListRowContext = createContext<ResourceListRowContextType>({
    row: {}
});

export const useResourceListRow = <T = object>() => {
    return useContext(ResourceListRowContext) as ResourceListRowContextType<T>;
};
