Helper resolving the dismissable/addable affordances for
<cngx-tab-group>. Keeps the close/add cascade + interaction off the
organism class (LOC guard). Each cascade is one computed().
The actual tab removal is the consumer's -
handleClose only routes through the presenter's requestClose, which
moves the active index, and restores focus once the consumer's removal
has rendered.
// The organism builds it once from field-init; the template reads it.protected readonly dismiss = createTabDismissals({ host: this.host, // CNGX_TAB_GROUP_HOST config: this.config, // injectTabsConfig() i18n: this.i18n, // injectTabsI18n() closable: this.closable, // input<boolean | undefined>('closable') addable: this.addable, // input<boolean | undefined>('addable') hostElement: this.hostElement, injector: this.injector,});// Per-tab close affordance, read from the header template:dismiss.isTabClosable(tab); // per-tab override > group resolutiondismiss.closeButtonLabel(tab); // i18n accessible name for the close buttondismiss.handleClose(tab, clickEvent); // routes through presenter.requestClose, restores focusdismiss.handleTabKeydown(tab, keyEvent); // Delete on a focused closable tab closes it (APG)// Group-level add affordance:dismiss.resolvedAddable(); // input ?? config ?? falsedismiss.handleAdd(); // routes through presenter.requestAdd