{{- $class := .Attributes.class | default "" -}}
{{- $filename := .Attributes.filename | default "" -}}
{{- $lang := .Attributes.lang | default .Type -}}
{{- $copyCode := (T "copyCode") | default "Copy code" -}}


<div class="code-block relative mt-6 first:mt-0 group/code">
  {{- if $filename -}}
    <div class="filename">{{ $filename }}</div>
  {{- end -}}
  {{- if transform.CanHighlight $lang -}}
    <div>{{- highlight .Inner $lang .Options -}}</div>
  {{- else -}}
    <pre><code>{{ .Inner }}</code></pre>