# Path: src/utils.py
# def get_selenium_driver(browser_name: str) -> Union[Chrome, Firefox]:
#     """
#     Return the same instance to the Selenium driver.
# 
#     :param browser_name: the name of the browser: chrome or mozilla
#     :type browser_name: str
#     :return: an instance of the required driver.
#     :rtype: Union[Chrome, Mozilla]
#     """
#     if browser_name.upper() == 'CHROME':
#         return SingletonFactory.build(Chrome)
# 
#     elif browser_name.upper() == 'Mozilla':
#         return SingletonFactory.build(Firefox)
# 
#     else:
#         raise NotImplementedError


import abc
from src.utils import get_selenium_driver



class Manager:
    """
    State machine manager.
    Acting as an interface to the client and providing the actual state of the object
    """

    def __init__(self, state):
        """

        :param state: current object state
        """
        self._state = state

    def get_state(self):
        """

        :return: state getter
        """
        self._state.run()


class State(metaclass=abc.ABCMeta):
    """
    Interface definition for behaviour encapsulation
    """

    def __init__(self):

# Path: src/utils.py
# def get_selenium_driver(browser_name: str) -> Union[Chrome, Firefox]:
#     """
#     Return the same instance to the Selenium driver.
# 
#     :param browser_name: the name of the browser: chrome or mozilla
#     :type browser_name: str
#     :return: an instance of the required driver.
#     :rtype: Union[Chrome, Mozilla]
#     """
#     if browser_name.upper() == 'CHROME':
#         return SingletonFactory.build(Chrome)
# 
#     elif browser_name.upper() == 'Mozilla':
#         return SingletonFactory.build(Firefox)
# 
#     else:
#         raise NotImplementedError


# Path: src/state/state.py
import abc
from src.utils import get_selenium_driver




class Manager:
    """
    State machine manager.
    Acting as an interface to the client and providing the actual state of the object
    """

    def __init__(self, state):
        """

        :param state: current object state
        """
        self._state = state

    def get_state(self):
        """

        :return: state getter
        """
        self._state.run()


class State(metaclass=abc.ABCMeta):
    """
    Interface definition for behaviour encapsulation
    """

    def __init__(self):

        self._driver = get_selenium_driver('chrome')