/*
 * Copyright (c) 2024 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import { join, resolve } from "node:path"

/////////////////////////////////////////////////
// CONSTANTS

export const WORKING_DIR = resolve(__dirname, '..', 'out')
export const CONFIGS_DIR = resolve(__dirname, '..', 'configs')
export const SDK_PATCH_DIR = join(__dirname, '..', 'patches')
export const SDK_PATCH_FILE = resolve(SDK_PATCH_DIR, '_default.patch')
export const GENERATED_IDL_DIR = join(WORKING_DIR, 'idl')
export const CLONED_SDK_DIR = join(WORKING_DIR, 'original-sdk')
export const CLONED_SDK_BUILD_TOOLS = join(CLONED_SDK_DIR, 'build-tools')
export const ABSOLUTE_SDK_DIR = join(WORKING_DIR, 'absolute-sdk-patched-arkts')
export const PREPARED_SDK_DIR_ARKTS = join(WORKING_DIR, 'patched-sdk-arkts')
export const PREPARED_SDK_ARKTS_INTERNAL = join(PREPARED_SDK_DIR_ARKTS, 'api', '@internal', 'component', 'ets')
export const PREPARED_SDK_ARKTS_ARKUI_COMPONENT = join(PREPARED_SDK_DIR_ARKTS, 'api', 'arkui', 'component')
export const PREPARED_SDK_DIR_TS = join(WORKING_DIR, 'patched-sdk-ts')
export const GENERATED_PEER_DIR = join(WORKING_DIR, 'peers')
export const GENERATED_PEER_SIG = join(GENERATED_PEER_DIR, 'sig')
export const GENERATED_PEER_LIBACE = join(GENERATED_PEER_DIR, 'libace')
export const ADDITIONAL_FILES = [
    ['global', 'resource.d.ets']
]
export const SCRAPER_CWD = join(WORKING_DIR, 'scraper')
export const CONFIG_RESULT_DIR = join(WORKING_DIR, 'configs')
export const RESPONSE_FILE_DIR = join(WORKING_DIR, 'response-files')