export const hasTags = details => Boolean(details && details.tags && details.tags.length);

export const hasCustomAttributes = customAttributes => Boolean(customAttributes && customAttributes.length);

const hasRelatedContent = relatedContent => Boolean(
    relatedContent && relatedContent.details && hasTags(relatedContent.details)
);

export const hasSidebar = (
    relatedContent,
    customAttributes
) => hasRelatedContent(relatedContent) || hasCustomAttributes(customAttributes);

export const hasSupportInfo = info => Boolean(
    info && (info.termsUrl || info.description || info.email || info.phone || info.privacyUrl || info.knowledgebaseUrl)
);

export const hasContactInfo = (...params) => params.some(param => param);
