from sysactions import (
    action,
    StopAction,
)

from application.interactor import TableInteractor


@action
def show_related_tabs(
        pos_id,    # type: str
        table_id   # type: str
):
    # type: (...) -> None

    from msgbusboundary import MsgBusTableService as tableService

    table_interactor = TableInteractor(pos_id, table_id, tableService())
    index = table_interactor.select_table_or_related_tab_by_dialog(pos_id, table_id)
    if index is None:
        raise StopAction()
