{# Admin area macros for reusable components. #} {# Modal dialog macro. Parameters: id: Modal element ID (without -modal suffix) title: Modal title (should be wrapped in translate block by caller) action_text: Text for the action button (optional - if omitted, no action button shown) action_handler: JavaScript function to call on action button click (optional) dialog_class: Additional classes for modal-dialog (optional, e.g., "modal-dialog-scrollable") content_class: Additional classes for modal-content (optional) footer_class: Additional classes for modal-footer (optional) Usage: {% call modal("example", title=_("Example Title"), action_text=_("Save"), action_handler="saveExample()") %}

Modal body content here

{% endcall %} #} {% macro modal(_, id, title, action_text=None, action_handler=None, dialog_class="", content_class="", footer_class="") %} {% endmacro %} {# Player count display - shows "You have selected X player(s)" message. Uses Alpine.js store for reactive updates. #} {% macro player_count(_) %}

{{ _("You have selected") }} {{ _("player(s)") }}.

{% endmacro %} {# JSON-like input textarea. Values are parsed by callers with uproot.looseJSONtoJSON() when JavaScript-expression input is allowed. #} {% macro json_input(_, id, label, rows=10, value="", help_text=None, placeholder="JSON") %}
{% if help_text %} {{ help_text }} {% endif %} {% endmacro %}