function withClickInteraction() {
  return {
    visibilityTriggerFunction: (
      /** @type {{ controller: OverlayController }} */ { controller },
    ) => {
      function handleOpenClosed() {
        if (controller._hasDisabledInvoker()) {
          return;
        }
        controller.toggle();
      }

      return {
        init: () => {
          controller.invokerNode?.addEventListener('click', handleOpenClosed);
        },
        teardown: () => {
          controller.invokerNode?.removeEventListener('click', handleOpenClosed);
        },
      };
    },
  };
}
Use for popovers/dropdowns, (modal) dialogs etc...
@returns {Partial<OverlayConfig>}