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

NmbDocValueDevelopSettingsUtils.lua

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

ADOBE CONFIDENTIAL
------------------
Copyright 2018 Adobe Systems Incorporated
All Rights Reserved.

NOTICE: All information contained herein is, and remains the property of
Adobe Systems Incorporated and its suppliers, if any. The intellectual and
technical concepts contained herein are proprietary to Adobe Systems
Incorporated 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 Systems Incorporated.

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

	-- wf.core
local KSTableUtils = require 'KSTableUtils'
	
--------------------------------------------------------------------------------

local KSTableUtils_derefOpt = assert( KSTableUtils.derefOpt,
										"KSTableUtils.derefOpt does not exist" )

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

local logger = require 'WFLogger'( 'NmbDocValueDevelopSettingsUtils' )
	
--------------------------------------------------------------------------------

local function getSanitizedDocValueDevelopStanza( docValue )

	local developStanza = KSTableUtils_derefOpt( docValue, "develop" )

	if type( developStanza ) ~= "table" then

		logger:infof( "Asset id %s has docStoreValue with type( docStoreValue.develop ) set to '%s'. using empty table for docStoreValue.develop",
						docValue._localId, type( developStanza ) )

		return {}

	end

	return developStanza

end

--==============================================================================

return {

	getSanitizedDocValueDevelopStanza = getSanitizedDocValueDevelopStanza,

}
