# src\file_conversor\backend\office\calc_backend.py

# user-provided imports
from file_conversor.config import Log
from file_conversor.config.locale import get_translation
from file_conversor.backend.office.abstract_libreoffice_backend import AbstractLibreofficeBackend

LOG = Log.get_instance()

_ = get_translation()
logger = LOG.getLogger(__name__)


class LibreofficeCalcBackend(AbstractLibreofficeBackend):
    """
    A class that provides an interface for handling doc files using ``calc`` (libreoffice).
    """

    SUPPORTED_IN_FORMATS = {
        "xls": {},
        "xlsx": {},
        "ods": {},
    }
    SUPPORTED_OUT_FORMATS = {
        "xls": {},
        "xlsx": {},
        "ods": {},
        "csv": {},
        "pdf": {},
        "html": {},
    }

    def __init__(
        self,
        install_deps: bool | None,
        verbose: bool = False,
    ):
        """
        Initialize the backend

        :param install_deps: Install external dependencies. If True auto install using a package manager. If False, do not install external dependencies. If None, asks user for action. 
        :param verbose: Verbose logging. Defaults to False.      
        """
        super().__init__(
            install_deps=install_deps,
            verbose=verbose
        )
