{# @description Where a project's or dataset's samples were taken: every sample with a location on one map, clustered where they crowd, each opening to its sample. The page sets has_map in its context so MapLibre is loaded. #}
{# @prop map:object | description:"The page's sample_map: located, missing, bounds, area, points_url and, on a project, datasets." #}
{# @prop id:text | description:"The panel's id." #}
{# @prop title:text | default:"Where the samples come from" | description:"The heading." #}
{# @prop more_url:text | description:"The samples list, linked as See all." #}
{# @prop empty:text | description:"What to say when no sample has a location." #}
{% load i18n humanize %}
{% if map.located %}
{% if map.bounds %}
{% endif %}
{% blocktranslate count counter=map.located with n=map.located|intcomma %}{{ n }} sample with a location{% plural %}{{ n }} samples with a location{% endblocktranslate %}
{% if map.missing %}{% blocktranslate count counter=map.missing with n=map.missing|intcomma %}{{ n }} without one{% plural %}{{ n }} without one{% endblocktranslate %}{% endif %}
{% if map.datasets %}{% blocktranslate count counter=map.datasets with n=map.datasets|intcomma %}from {{ n }} dataset{% plural %}from {{ n }} datasets{% endblocktranslate %}{% endif %}
{% if map.area %}{{ map.area }}{% endif %}
{% if map.bounds %}{% translate "Select a cluster to zoom in, or a point to open its sample." %}{% endif %}
{% else %}
{{ empty|default:_("None of the samples has a location yet, so there is nothing to map.") }}