{{- $type  := .Get "type" | default "note" -}}
{{- $title := .Get "title" | default (i18n (printf "callout_%s" $type)) -}}
{{- $role  := cond (eq $type "danger") "alert" "note" -}}
{{- $icons := dict "note" "edit-2" "tip" "zap" "info" "info" "warning" "alert-triangle" "danger" "x-circle" "success" "check-circle" -}}
{{- $icon  := index $icons $type | default "info" -}}

<div class="callout callout-{{ $type }}" role="{{ $role }}">
  <div class="callout-title">
    <i data-feather="{{ $icon }}" class="w-3.5 h-3.5" aria-hidden="true"></i>
    <span>{{ $title }}</span>
  </div>
  <div class="callout-body">
    {{- .Inner | markdownify -}}
  </div>
</div>
