Calling the close hooks currently doesn't look correct:
(run-hook-with-args 'tab-bar-tab-pre-close-functions
(nth close-index tabs)
last-tab-p)
(if last-tab-p
(pcase tab-bar-close-last-tab-choice
('nil
(user-error "Attempt to delete the sole tab in a frame"))
where first it makes an attempt to close the tab, calls the hook,
then fails with the user-error. I think the hook should be called
when the tab is really closed.