from ._TableError import TableError
from typing import Dict


class TabToJoinOpenedInAnotherPOS(TableError):

    def __init__(
        self,       # type: TabToJoinOpenedInAnotherPOS
        tab_name,   # type: str
    ):
        # type: (...) -> None

        message = "$TAB_TO_JOIN_IS_OPENED_IN_ANOTHER_POS|{}".format(tab_name)
        super(TabToJoinOpenedInAnotherPOS, self).__init__(message)

        self.tab_name = tab_name

    def get_extra_data(
        self,   # type: TabToJoinOpenedInAnotherPOS
    ):
        # type: (...) -> Dict[str, str]

        return {
            "tabName": self.tab_name,
        }
