export const useLogic = ({ gridPosition, field, isSortable, startAdornment, onSort, }) => {
    const hasStartAdornment = Boolean(startAdornment);
    const handleSortClick = () => {
        if (field && isSortable) {
            onSort(field);
        }
    };
    const headCellCssVars = {
        '--grid-column-start': gridPosition?.start,
        '--grid-column-end': gridPosition?.end,
    };
    return {
        hasStartAdornment,
        handleSortClick,
        headCellCssVars,
    };
};
