--[[----------------------------------------------------------------------------

NmbAcrMocks.lua

--------------------------------------------------------------------------------

ADOBE CONFIDENTIAL
------------------
Copyright 2020 Adobe
All Rights Reserved.

NOTICE: All information contained herein is, and remains
the property of Adobe and its suppliers, if any. The intellectual
and technical concepts contained herein are proprietary to Adobe
and its suppliers and are protected by all applicable intellectual
property laws, including trade secret and copyright laws.
Dissemination of this information or reproduction of this material
is strictly forbidden unless prior written permission is obtained
from Adobe.

------------------------------------------------------------------------------]]

	-- RxLua
local Rx = require 'Rx'
local NmbAcrMockWFCrContext = require 'NmbAcrMockWFCrContext'
local NmbVFMockWFVideoFoundationContext = require 'NmbVFMockWFVideoFoundationContext'

--------------------------------------------------------------------------------

local NmbAcrMocks = {}

--------------------------------------------------------------------------------

local WFCrInfo = {
	getACRVersion = function() return 3 end,
	supportsHeic = function() return false end,
	isMocked = function() return true end,
	isUserPresetDirInitialized = function() return true end,
}

--------------------------------------------------------------------------------

local WFAcrOperations = {
	getCoreCameraProfilesMap = function()
		local modelProfileMap = {
			[ 'CANON EOS 70D' ] = {
				{ fileName = 'Canon EOS 70D Adobe Standard.dcp', relativePath = 'Standard/Canon EOS 70D Adobe Standard.dcp' },
				{ fileName = 'Canon EOS 70D Camera Faithful.dcp', relativePath = 'Camera/Canon EOS 70D/Canon EOS 70D Camera Faithful.dcp' },
				{ fileName = 'Canon EOS 70D Camera Landscape.dcp', relativePath = 'Camera/Canon EOS 70D/Canon EOS 70D Camera Landscape.dcp' },
				{ fileName = 'Canon EOS 70D Camera Neutral.dcp', relativePath = 'Camera/Canon EOS 70D/Canon EOS 70D Camera Neutral.dcp' },
				{ fileName = 'Canon EOS 70D Camera Portrait.dcp', relativePath = 'Camera/Canon EOS 70D/Canon EOS 70D Camera Portrait.dcp' },
				{ fileName = 'Canon EOS 70D Camera Standard.dcp', relativePath = 'Camera/Canon EOS 70D/Canon EOS 70D Camera Standard.dcp' },
			},
			[ 'NIKON D5200' ] = {
				{ fileName = 'Nikon D5200 Adobe Standard.dcp', relativePath = 'Adobe Standard/Nikon D5200 Adobe Standard.dcp' },
				{ fileName = 'Nikon D5200 Camera Landscape.dcp', relativePath = 'Camera/Nikon D5200/Nikon D5200 Camera Landscape.dcp' },
				{ fileName = 'Nikon D5200 Camera Neutral.dcp', relativePath = 'Camera/Nikon D5200/Nikon D5200 Camera Neutral.dcp' },
				{ fileName = 'Nikon D5200 Camera Portrait.dcp', relativePath = 'Camera/Nikon D5200/Nikon D5200 Camera Portrait.dcp' },
				{ fileName = 'Nikon D5200/Nikon D5200 Camera Standard.dcp', relativePath = 'Camera/Nikon D5200/Nikon D5200 Camera Standard.dcp' },
				{ fileName = 'Nikon D5200 Camera Vivid.dcp', relativePath = 'Camera/Nikon D5200/Nikon D5200 Camera Vivid.dcp' },
			}
		}
		return Rx.Observable.just( modelProfileMap )
	end,
	getStyleFavorites = function() 
		return Rx.Observable.just( {} )
	end,
	refreshACRDatabases = function()
		return Rx.Observable.empty()
	end,
}

--------------------------------------------------------------------------------

local WFCatExport = {
	exportAssetsFromCatalog = function()
		return Rx.Observable.just( {} )
	end,
	checkAndReclaimSpace = function()
		return Rx.Observable.just( {} )
	end,
}

local WFCrDevelopSettings = {
	extractAuxFilesFromXMP = function( xmp, auxFilePath, filePath, fileName )
		local retVal = {}

		local needsUpdateAISettings = false
		return retVal, xmp, needsUpdateAISettings
	end
}

--------------------------------------------------------------------------------

local WFVfInfo = {
	getVFVersion = function()
		return 1, 1
	end
}

--------------------------------------------------------------------------------

function NmbAcrMocks.getApiTable( apiTable )

	return {
		WFAcrOperations = WFAcrOperations,
		WFCrContext = NmbAcrMockWFCrContext,
		WFCrInfo = WFCrInfo,
		WFCrDevelopSettings = WFCrDevelopSettings,
		
		WFVfInfo = WFVfInfo,
		WFVideoFoundationContext = NmbVFMockWFVideoFoundationContext,
		
		WFCatExport = WFCatExport,
	}

end

--------------------------------------------------------------------------------

return NmbAcrMocks
