import { deepCopyObject } from '../utilities/deepCopyObject.js';
const getValueWithDefault = ({ defaultValue, req, value })=>{
    if (typeof value !== 'undefined') {
        return value;
    }
    if (defaultValue && typeof defaultValue === 'function') {
        return defaultValue(req);
    }
    if (typeof defaultValue === 'object') {
        return deepCopyObject(defaultValue);
    }
    return defaultValue;
};
// eslint-disable-next-line no-restricted-exports
export default getValueWithDefault;

//# sourceMappingURL=getDefaultValue.js.map