{# Builds a NSW Design System global alert component. title - The alert title text content - The alert content/message type - The alert type (default: "info") - determines the styling. Options are: "info", "light", "critical" button_text - Optional button text for action button button_url - Optional button URL for action button dismissible - Whether the alert can be dismissed (default: true) cookie_name - Optional unique identifier. If provided, the alert dismissal status will be saved in a cookie (default: "") Example: {% import 'macros/form.html' as form %} {{ form.global_alert( title="State of Emergency for NSW", content="Catastrophic weather conditions are forecast this week for north and north west regions of NSW. Keep up to date with the latest bush fires alerts and warnings in your area.", type="light", cookie_name="weather_alert_2023" ) }} #} {% macro global_alert(title="", content="", type="info", button_text="", button_url="", dismissible=true, cookie_name="") %} {% set button_type = "white" %} {% if type == "light" %} {% set button_type = "info" %} {% endif %} {% if title or content %} {% endif %} {% endmacro %}