{{ location.name|default:"Unknown Location" }}

{% if location.type %} {% if location.type == 'park' %} Park {% elif location.type == 'ride' %} Ride {% elif location.type == 'company' %} Company {% else %} Location {% endif %} {% endif %}
{% if location.formatted_location %}
{{ location.formatted_location }}
{% endif %} {% if location.distance %}
{{ location.distance|floatformat:1 }} miles away
{% endif %} {% if location.type == 'park' %} {% if location.status %}
{% if location.status == 'OPERATING' %} Operating {% elif location.status == 'CLOSED_TEMP' %} Temporarily Closed {% elif location.status == 'CLOSED_PERM' %} Permanently Closed {% elif location.status == 'UNDER_CONSTRUCTION' %} Under Construction {% elif location.status == 'DEMOLISHED' %} Demolished {% endif %}
{% endif %} {% if location.operator %}
{{ location.operator }}
{% endif %} {% if location.ride_count %}
{{ location.ride_count }} ride{{ location.ride_count|pluralize }}
{% endif %} {% if location.average_rating %}
{{ location.average_rating|floatformat:1 }}/10 rating
{% endif %} {% if location.opening_date %}
Opened {{ location.opening_date.year }}
{% endif %} {% elif location.type == 'ride' %} {% if location.park_name %}
{{ location.park_name }}
{% endif %} {% if location.manufacturer %}
{{ location.manufacturer }}
{% endif %} {% if location.designer %}
{{ location.designer }}
{% endif %} {% if location.opening_date %}
Opened {{ location.opening_date.year }}
{% endif %} {% if location.status %}
{% if location.status == 'OPERATING' %} Operating {% elif location.status == 'CLOSED' %} Closed {% elif location.status == 'UNDER_CONSTRUCTION' %} Under Construction {% elif location.status == 'DEMOLISHED' %} Demolished {% endif %}
{% endif %} {% elif location.type == 'company' %} {% if location.company_type %}
{{ location.get_company_type_display }}
{% endif %} {% if location.founded_year %}
Founded {{ location.founded_year }}
{% endif %} {% if location.parks_count %}
{{ location.parks_count }} park{{ location.parks_count|pluralize }}
{% endif %} {% if location.rides_count %}
{{ location.rides_count }} ride{{ location.rides_count|pluralize }}
{% endif %} {% endif %} {% if custom_content %}
{{ custom_content|safe }}
{% endif %}
{% if show_details_button %} {{ details_button_text|default:"View Details" }} {% endif %} {% if show_nearby_button and location.latitude and location.longitude %} {{ nearby_button_text|default:"Find Nearby" }} {% endif %} {% if show_directions_button and location.latitude and location.longitude %} {% endif %} {% if show_trip_button %} {% endif %} {% if show_share_button %} {% endif %} {% if custom_actions %} {% for action in custom_actions %} <{{ action.tag|default:"button" }} {% if action.href %}href="{{ action.href }}"{% endif %} {% if action.onclick %}onclick="{{ action.onclick }}"{% endif %} class="popup-btn {{ action.classes|default:'popup-btn-secondary' }}"> {% if action.icon %}{% endif %}{{ action.text }} {% endfor %} {% endif %}