# This file was auto-generated by Fern from our API Definition.

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class Tool(str, enum.Enum):
    SEARCH = "search"
    BROWSE = "browse"

    def visit(self, search: typing.Callable[[], T_Result], browse: typing.Callable[[], T_Result]) -> T_Result:
        if self is Tool.SEARCH:
            return search()
        if self is Tool.BROWSE:
            return browse()
