{# ================================================================================ Action Bar Component (Kida-Native) ================================================================================ PATTERN: POPOVER - Share dropdown and metadata panel use native [popover] - Browser handles: show/hide, light dismiss, escape key, top layer - JS handles: Copy actions, AI share functionality KIDA FEATURES USED: - {% let %} for template-scoped variables - Optional chaining (?.) for null-safe access - Null coalescing (??) for smart defaults - {% def %} for reusable helper USAGE: {% include 'partials/action-bar.html' %} ================================================================================ #} {# ============================================================================= HELPER: Get page URL with fallback chain ============================================================================= #} {% def get_page_url(page) -%} {{ (page?.href ?? page?._path ?? '/') | trim }} {%- end %} {# ============================================================================= BREADCRUMB ITEM HELPER ============================================================================= #} {% def breadcrumb_item(item, has_metadata=false) %} {% let item_title = item?.title ?? 'Page' %} {% let item_href = item?.href ?? '#' %} {% let is_current = item?.is_current ?? false %}