{% import '@Marketplace/macros.twig' as marketplaceMacro %}
{% block content %}
{% if errorMessage %}
{{ errorMessage }}
{% elseif plugin %}
{% set isBundle = plugin.isBundle is defined and plugin.isBundle %}
{% if plugin.versions is not empty and plugin.versions[plugin.versions|length - 1] %}
{% set latestVersion = plugin.versions[plugin.versions|length - 1] %}
{% else %}
{% set latestVersion = '' %}
{% endif %}
{% endif %}
{% if plugin.shop is defined and plugin.shop and plugin.shop.reviews and plugin.shop.reviews.embedUrl is defined and plugin.shop.reviews.embedUrl %}
{% if isSuperUser and (plugin.isDownloadable or plugin.isInstalled) %}
{{ marketplaceMacro.missingRequirementsPleaseUpdateNotice(plugin) }}
{% if isMultiServerEnvironment %}
{% endif %}
{% if plugin.shop is defined and plugin.shop and plugin.shop.reviews and plugin.shop.reviews.embedUrl is defined and plugin.shop.reviews.embedUrl %}
{% endif %}
{% if not plugin.isDownloadable or not isSuperUser %}
{% if hasSomeAdminAccess and plugin.hasExceededLicense is defined and plugin.hasExceededLicense and plugin.consumer %}
{% if plugin.consumer.loginUrl is defined and plugin.consumer.loginUrl %}
{{ 'Marketplace_UpgradeSubscription'|translate }}
{% endif %}
{% elseif not plugin.isDownloadable and plugin.isPaid and plugin.shop is defined and plugin.shop %}
{% if plugin.shop.variations|length %}
{% if latestVersion and latestVersion.license is defined and latestVersion.license and latestVersion.license.name is defined and latestVersion.license.name %}
{{ 'Marketplace_License'|translate }}
{% if latestVersion.license.url is defined and latestVersion.license.url %}
{{ latestVersion.license.name }}
{% else %}
{{ latestVersion.license.name }}
{% endif %}
{% endif %}
{{ 'Marketplace_Authors'|translate }}
{% for author in plugin.authors if author.name %}
{% spaceless %}
{% if author.homepage %}
{{ author.name }}
{% elseif author.email %}
{{ author.name }}
{% else %}
{{ author.name }}
{% endif %}
{% if loop.index < plugin.authors|length %}
,
{% endif %}
{% endspaceless %}
{% endfor %}
{% if plugin.support is not empty %}
{% for entry in plugin.support %}
{% if entry.name and entry.value %}
{{ entry.name }}
{{ entry.value }}
{% endif %}
{% endfor %}
{% endif %}
{% if plugin.shop is defined and plugin.shop and plugin.shop.reviews and plugin.shop.reviews.embedUrl is defined and plugin.shop.reviews.embedUrl %}
{% endif %}
{% endif %}