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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class ConfigurableTransformationNames(str, enum.Enum):
    CHARACTER_SPLITTER = "CHARACTER_SPLITTER"
    PAGE_SPLITTER_NODE_PARSER = "PAGE_SPLITTER_NODE_PARSER"
    CODE_NODE_PARSER = "CODE_NODE_PARSER"
    SENTENCE_AWARE_NODE_PARSER = "SENTENCE_AWARE_NODE_PARSER"
    TOKEN_AWARE_NODE_PARSER = "TOKEN_AWARE_NODE_PARSER"
    MARKDOWN_NODE_PARSER = "MARKDOWN_NODE_PARSER"
    MARKDOWN_ELEMENT_NODE_PARSER = "MARKDOWN_ELEMENT_NODE_PARSER"

    def visit(
        self,
        character_splitter: typing.Callable[[], T_Result],
        page_splitter_node_parser: typing.Callable[[], T_Result],
        code_node_parser: typing.Callable[[], T_Result],
        sentence_aware_node_parser: typing.Callable[[], T_Result],
        token_aware_node_parser: typing.Callable[[], T_Result],
        markdown_node_parser: typing.Callable[[], T_Result],
        markdown_element_node_parser: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is ConfigurableTransformationNames.CHARACTER_SPLITTER:
            return character_splitter()
        if self is ConfigurableTransformationNames.PAGE_SPLITTER_NODE_PARSER:
            return page_splitter_node_parser()
        if self is ConfigurableTransformationNames.CODE_NODE_PARSER:
            return code_node_parser()
        if self is ConfigurableTransformationNames.SENTENCE_AWARE_NODE_PARSER:
            return sentence_aware_node_parser()
        if self is ConfigurableTransformationNames.TOKEN_AWARE_NODE_PARSER:
            return token_aware_node_parser()
        if self is ConfigurableTransformationNames.MARKDOWN_NODE_PARSER:
            return markdown_node_parser()
        if self is ConfigurableTransformationNames.MARKDOWN_ELEMENT_NODE_PARSER:
            return markdown_element_node_parser()
