# -*- coding: utf-8 -*-

# Copyright 2011-2025, extragroup GmbH, Pottkamp 19, 48149 Münster, Germany
# All rights reserved
#
# All information contained herein is, and remains the property of
# extragroup GmbH and its suppliers, if any. The intellectual and
# technical concepts contained herein are proprietary to extragroup GmbH
# and its suppliers and are protected by trade secret or copyright law.
# Dissemination of this information or reproduction of this material is
# strictly forbidden unless prior written permission is obtained from
# extragroup GmbH

import os.path
from typing import Optional

import interiorcad.cuttinglistexport.corporaintegrationexport
from interiorcad.backend.systemdirectories import getSystemDirectories


class CorporaExport(interiorcad.cuttinglistexport.corporaintegrationexport.CorporaIntegrationExport):
    def __init__(self):
        super().__init__()
        self.configuration.basePathPrefix = ''
        self.configuration.customizeablePath = '{VWDocumentFolder}'

    def getLogFilePath(self, **_keywords) -> Optional[str]:
        vwUserDirectoryPath = getSystemDirectories()['VWUserDir']
        return os.path.join(vwUserDirectoryPath, "interiorcad Corpora Integration Export Log.txt")


export = CorporaExport()
export.doCuttinglistExport()
