from ._TableError import TableError
from typing import Dict


class TabToJoinInInvalidStatus(TableError):

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

        message = "$TAB_TO_JOIN_IN_INVALID_STATUS|{}|{}".format(tab_name, state)
        super(TabToJoinInInvalidStatus, self).__init__(message)

        self.tab_name = tab_name
        self.state = state

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

        return {
            "tabName": self.tab_name,
            "state": self.state,
        }
