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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class DocumentChunkMode(str, enum.Enum):
    PAGE = "PAGE"
    SECTION = "SECTION"

    def visit(self, page: typing.Callable[[], T_Result], section: typing.Callable[[], T_Result]) -> T_Result:
        if self is DocumentChunkMode.PAGE:
            return page()
        if self is DocumentChunkMode.SECTION:
            return section()
