from enum import Enum

TEXT_EMBEDDING = "TEXT_EMBEDDING_EXTRACTION"
DRAFT_ZONE = "draft"
PUBLISHED_ZONE = "published"
GENERATE_DOCX_TOOL_NAME = "generate_docx"
GENERATE_DOCX_TOOL_REF = "agent_hub:generate_docx"
GENERATE_PPTX_TOOL_NAME = "generate_pptx"
GENERATE_PPTX_TOOL_REF = "agent_hub:generate_pptx"
REVISE_PPTX_TOOL_NAME = "revise_pptx"
REVISE_PPTX_TOOL_REF = "agent_hub:revise_pptx"
REVISE_DOCX_TOOL_NAME = "revise_docx"
REVISE_DOCX_TOOL_REF = "agent_hub:revise_docx"
READ_ARTIFACT_TOOL_NAME = "read_artifact"
READ_ARTIFACT_TOOL_REF = "agent_hub:read_artifact"
PDF_MIME_TYPE = "application/pdf"
DOCX_MIME_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
PPTX_MIME_TYPE = "application/vnd.openxmlformats-officedocument.presentationml.presentation"

# simple map because mimetype are hardcoded in DIP, generate_artifacts.py
DIP_MIMETYPE_EXTENSIONS = {
    PDF_MIME_TYPE: "pdf",
    DOCX_MIME_TYPE: "docx",
    "image/png": "png",
    "image/jpeg": "jpeg",
    "image/jpg": "jpg",
    "image/svg+xml": "svg",
    "image/tiff": "tiff",
    "image/bmp": "bmp",
    "image/gif": "gif",
    PPTX_MIME_TYPE: "pptx",
}


class ExtractionMode(str, Enum):
    """Supported document extraction modes."""

    PAGES_SCREENSHOTS = "pagesScreenshots"
    PAGES_TEXT = "pagesText"


DEFAULT_EXTRACTION_MODE: str = ExtractionMode.PAGES_SCREENSHOTS.value


class CloudConnections(Enum):
    SHAREPOINT_ONLINE = "SharePointOnline"
