Form submit callback to remove the selected items.
function submitEmptyCart(array $form, FormStateInterface $form_state) {
\Drupal::entityTypeManager()
->getStorage('tmgmt_job_item')
->delete(tmgmt_cart_get()
->getJobItemsFromCart());
tmgmt_cart_get()
->emptyCart();
$this
->messenger()
->addStatus(t('All job items were removed from the cart.'));
}