{{/* Check parameter type */ -}}
{{ $code := false -}}
{{ with .Get "code" -}}
  {{ $type := printf "%T" . -}}
  {{ if ne $type "bool" -}}
    {{ errorf `shortcode 'card': boolean value expected for parameter 'code', but got %s` $type -}}
  {{ else }}
    {{ $code = . -}}
  {{ end -}}
{{ end -}}

{{ $lang := default "" (.Get "lang") -}}
{{ $highlight := default "" (.Get "highlight") -}}

<div class="td-card card border me-4">
{{ with $.Get "header" -}}
    <div class="card-header{{- cond $code " code" "" -}