{{- /*
  Usage: `example [args]`

  `args` are optional and can be one of the following:
    id: the `div`'s id - default: ""
    class: any extra class(es) to be added to the `div` - default ""
    show_preview: if the preview should be output in the HTML - default: `true`
    show_markup: if the markup should be output in the HTML - default: `true`
*/ -}}

{{- $lang := .Get "lang" | default "html" -}}
{{- $show_preview := .Get "show_preview" | default true -}}
{{- $show_markup := .Get "show_markup" | default true -}}
{{- $show_dark := .Get "show_dark" | default false -}}
{{- $disable_init_js := .Get "disable_init_js" | default false -}}
{{- $input := .Inner -}}
{{- $iframeHeight := .Get "iframeHeight" | default false -}}
{{- $iframeMaxHeight := .Get "iframeMaxHeight" | default false -}}
{{- $class := .Get "class" | default false -}}
{{- $bodyClass := .Get "bodyClass" | default false -}}
{{- $id := .Get "id" | default (printf "code-%d" (now.UnixNano)) -}}

{{- $skeletonPlaceholdersMarkup := "<div class='max-w-lg mx-auto'> <div role='status' class='my-7 animate-pulse'> <div class='h-2.5 bg-neutral-tertiary rounded-full w-48 mb-4'></div><div class='h-2 bg-neutral-tertiary rounded-full max-w-[460px] mb-2.5'></div><div class='h-2 bg-neutral-tertiary rounded-full max-w-[500px] mb-2.5'></div><div class='h-2 bg-neutral-tertiary rounded-full max-w-[450px] mb-2.5'></div><div class='h-2 bg-neutral-tertiary rounded-full max-w-[380px] mb-2.5'></div><div class='h-2 bg-neutral-tertiary rounded-full max-w-[460px]'></div><span class='sr-only'>Loading...</span> </div><div role='status' class='max-w-lg mb-7 animate-pulse'> <div class='flex items-center justify-center w-full h-48 bg-neutral-tertiary rounded-sm'> <svg class='w-12 h-12 text-fg-disabled' xmlns='http://www.w3.org/2000/svg' aria-hidden='true' fill='currentColor' viewBox='0 0 640 512'><path d='M480 80C480 35.82 515.8 0 560 0C604.2 0 640 35.82 640 80C640 124.2 604.2 160 560 160C515.8 160 480 124.2 480 80zM0 456.1C0 445.6 2.964 435.3 8.551 426.4L225.3 81.01C231.9 70.42 243.5 64 256 64C268.5 64 280.1 70.42 286.8 81.01L412.7 281.7L460.9 202.7C464.1 196.1 472.2 192 480 192C487.8 192 495 196.1 499.1 202.7L631.1 419.1C636.9 428.6 640 439.7 640 450.9C640 484.6 612.6 512 578.9 512H55.91C25.03 512 .0006 486.1 .0006 456.1L0 456.1z'/></svg> </div><span class='sr-only'>Loading...</span> </div><div role='status' class='my-6 animate-pulse'> <div class='h-2 bg-neutral-tertiary rounded-full max-w-[460px] mb-2.5'></div><div class='h-2 bg-neutral-tertiary rounded-full max-w-[450px] mb-2.5'></div><div class='h-2 bg-neutral-tertiary rounded-full max-w-[460px] mb-2.5'></div><div class='h-2 bg-neutral-tertiary rounded-full max-w-[500px] mb-2.5'></div><div class='h-2 bg-neutral-tertiary rounded-full max-w-[450px] mb-2.5'></div><div class='h-2 bg-neutral-tertiary rounded-full max-w-[380px] mb-2.5'></div><div class='h-2 bg-neutral-tertiary rounded-full max-w-[460px]'></div><span class='sr-only'>Loading...</span> </div><div role='status' class='my-6 animate-pulse'> <div class='h-2 bg-neutral-tertiary rounded-full max-w-[460px] mb-2.5'></div><div class='h-2 bg-neutral-tertiary rounded-full max-w-[450px] mb-2.5'></div><div class='h-2 bg-neutral-tertiary rounded-full max-w-[460px] mb-2.5'></div><div class='h-2 bg-neutral-tertiary rounded-full max-w-[500px] mb-2.5'></div><span class='sr-only'>Loading...</span> </div><div role='status' class='mb-6 mt-7 animate-pulse'> <div class='h-2.5 bg-neutral-tertiary rounded-full w-48 mb-4'></div><div class='h-2 bg-neutral-tertiary rounded-full max-w-[460px] mb-2.5'></div><div class='h-2 bg-neutral-tertiary rounded-full max-w-[450px] mb-2.5'></div><div class='h-2 bg-neutral-tertiary rounded-full max-w-[460px] mb-2.5'></div><div class='h-2 bg-neutral-tertiary rounded-full max-w-[500px] mb-2.5'></div><div class='h-2 bg-neutral-tertiary rounded-full max-w-[450px] mb-2.5'></div><div class='h-2 bg-neutral-tertiary rounded-full max-w-[380px] mb-2.5'></div><div class='h-2 bg-neutral-tertiary rounded-full max-w-[460px] mb-2.5'></div><div class='h-2 bg-neutral-tertiary rounded-full max-w-[500px] mb-2.5'></div><div class='h-2 bg-neutral-tertiary rounded-full max-w-[460px]'></div><span class='sr-only'>Loading...</span> </div><div role='status' class='my-6 animate-pulse'> <div class='h-2 bg-neutral-tertiary rounded-full max-w-[460px] mb-2.5'></div><div class='h-2 bg-neutral-tertiary rounded-full max-w-[450px] mb-2.5'></div><span class='sr-only'>Loading...</span> </div></div>" -}}
{{- $skeletonPlaceholders := .Get "skeletonPlaceholders" | default false -}}

{{ $javascript := .Get "javascript" | default "" | safeJS }}
{{ $loadJavascriptListener := .Get "loadJavascriptListener" | default false }}

{{- $script_module := .Get "script_module" | default false -}}
{{- $wysiwyg := .Get "wysiwyg" | default false -}}
{{ $wysiwyg_json_fix := `{"imports": {"https://esm.sh/v135/prosemirror-model@1.22.3/es2022/prosemirror-model.mjs": "https://esm.sh/v135/prosemirror-model@1.19.3/es2022/prosemirror-model.mjs", "https://esm.sh/v135/prosemirror-model@1.22.1/es2022/prosemirror-model.mjs": "https://esm.sh/v135/prosemirror-model@1.19.3/es2022/prosemirror-model.mjs"}}` }}

{{- $initDatepicker := .Get "initDatepicker" | default false -}}
{{- $charts := .Get "charts" | default false -}}
{{- $datatables := .Get "datatables" | default false -}}

<div class="my-8 code-example rounded-b-base">
  
  {{- if eq $show_preview true -}}
  
  <div class="w-full p-4 border border-default bg-neutral-secondary-soft rounded-t-base">
    <div class="grid grid-cols-3">
      {{ with .Get "github" }}
      <div class="col-span-2 sm:col-span-1">
        <a href="https://github.com/themesberg/flowbite/blob/main/content/{{ . }}" rel="noopener nofollow noreferrer" class="inline-flex items-center justify-center h-9 mr-3 px-3 text-xs font-medium text-body bg-neutral-primary-medium border border-default-medium focus:outline-none hover:bg-neutral-secondary-strong hover:border-default-strong hover:text-heading focus:z-10 focus:ring-2 focus:ring-neutral-tertiary rounded-base">
          <svg class="w-3.5 h-3.5 mr-2" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
            <path fill-rule="evenodd" d="M10 .333A9.911 9.911 0 0 0 6.866 19.65c.5.092.678-.215.678-.477 0-.237-.01-1.017-.014-1.845-2.757.6-3.338-1.169-3.338-1.169a2.627 2.627 0 0 0-1.1-1.451c-.9-.615.07-.6.07-.6a2.084 2.084 0 0 1 1.518 1.021 2.11 2.11 0 0 0 2.884.823c.044-.503.268-.973.63-1.325-2.2-.25-4.516-1.1-4.516-4.9A3.832 3.832 0 0 1 4.7 7.068a3.56 3.56 0 0 1 .095-2.623s.832-.266 2.726 1.016a9.409 9.409 0 0 1 4.962 0c1.89-1.282 2.717-1.016 2.717-1.016.366.83.402 1.768.1 2.623a3.827 3.827 0 0 1 1.02 2.659c0 3.807-2.319 4.644-4.525 4.889a2.366 2.366 0 0 1 .673 1.834c0 1.326-.012 2.394-.012 2.72 0 .263.18.572.681.475A9.911 9.911 0 0 0 10 .333Z" clip-rule="evenodd"/>
          </svg> Edit on GitHub
        </a>
      </div>
      {{ end }}
      <div class="items-center justify-center hidden col-span-1 space-x-2 sm:flex">
        <button {{ if $id }} data-tooltip-target="{{ $id }}-full-screen-tooltip"{{ end }} class="toggle-full-view flex items-center justify-center w-9 h-9 text-xs font-medium text-body bg-neutral-primary-medium border border-default-medium rounded-base focus:outline-none hover:bg-neutral-secondary-strong hover:border-default-strong hover:text-heading focus:z-10 focus:ring-2 focus:ring-neutral-tertiary"><span class="sr-only">Toggle full view</span>
          <svg class="w-5 h-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
            <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v5m-3 0h6M4 11h16M5 15h14a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v9a1 1 0 0 0 1 1Z"/>
          </svg>
        </button>
        {{ if $id }}
          <div id="{{ $id }}-full-screen-tooltip" role="tooltip" class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white transition-opacity duration-300 bg-dark rounded-lg shadow-xs opacity-0 tooltip">
              Toggle full screen
              <div class="tooltip-arrow" data-popper-arrow></div>
          </div>
        {{ end }}
        <button {{ if $id }} data-tooltip-target="{{ $id }}-tablet-tooltip"{{ end }} class="toggle-tablet-view flex items-center justify-center w-9 h-9 text-xs font-medium text-body bg-neutral-primary-medium border border-default-medium rounded-base focus:outline-none hover:bg-neutral-secondary-strong hover:border-default-strong hover:text-heading focus:z-10 focus:ring-2 focus:ring-neutral-tertiary"><span class="sr-only">Toggle tablet view</span>
          <svg class="w-5 h-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
            <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 18h2M5.875 3h12.25c.483 0 .875.448.875 1v16c0 .552-.392 1-.875 1H5.875C5.392 21 5 20.552 5 20V4c0-.552.392-1 .875-1Z"/>
          </svg>
        </button>
        {{ if $id }}
          <div id="{{ $id }}-tablet-tooltip" role="tooltip" class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white transition-opacity duration-300 bg-dark rounded-lg shadow-xs opacity-0 tooltip">
              Toggle tablet view
              <div class="tooltip-arrow" data-popper-arrow></div>
          </div>
        {{ end }}
        <button {{ if $id }} data-tooltip-target="{{ $id }}-mobile-tooltip"{{ end }} class="toggle-mobile-view flex items-center justify-center w-9 h-9 text-xs font-medium text-body bg-neutral-primary-medium border border-default-medium rounded-base focus:outline-none hover:bg-neutral-secondary-strong hover:border-default-strong hover:text-heading focus:z-10 focus:ring-2 focus:ring-neutral-tertiary"><span class="sr-only">Toggle mobile view</span>
          <svg class="w-5 h-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
            <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 15h12M6 6h12m-6 12h.01M7 21h10a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1Z"/>
          </svg>
        </button>
        {{ if $id }}
        <div id="{{ $id }}-mobile-tooltip" role="tooltip" class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white transition-opacity duration-300 bg-dark rounded-lg shadow-xs opacity-0 tooltip">
            Toggle mobile view
            <div class="tooltip-arrow" data-popper-arrow></div>
        </div>
      {{ end }}
      </div>
      <div class="flex justify-end col-span-1">  
        <button {{ if $id }} data-tooltip-target="{{ $id }}-toggle-rtl"{{ end }} data-toggle-direction="ltr" type="button" class="toggle-rtl mr-2 flex items-center justify-center w-9 h-9 text-xs font-medium text-body bg-neutral-primary-medium border border-default-medium rounded-base focus:outline-none hover:bg-neutral-secondary-strong hover:border-default-strong hover:text-heading focus:z-10 focus:ring-2 focus:ring-neutral-tertiary">
          RTL
        </button> 
        <div id="{{ $id }}-toggle-rtl" role="tooltip" class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white transition-opacity duration-300 bg-dark rounded-lg shadow-xs opacity-0 tooltip">
            <span class="tooltip-text">Toggle RTL mode</span>
            <div class="tooltip-arrow" data-popper-arrow></div>
        </div>
        {{- if eq $show_dark true -}}
          <button {{ if $id }} data-tooltip-target="{{ $id }}-toggle-dark-mode-tooltip"{{ end }} type="button" data-toggle-dark="light" class="toggle-dark-state-example flex items-center justify-center w-9 h-9 text-xs font-medium text-body bg-neutral-primary-medium border border-default-medium rounded-base focus:outline-none hover:bg-neutral-secondary-strong hover:border-default-strong hover:text-heading focus:z-10 focus:ring-2 focus:ring-neutral-tertiary">
            <svg data-toggle-icon="moon" class="w-5 h-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
              <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 21a9 9 0 0 1-.5-17.986V3c-.354.966-.5 1.911-.5 3a9 9 0 0 0 9 9c.239 0 .254.018.488 0A9.004 9.004 0 0 1 12 21Z"/>
            </svg>
            <svg data-toggle-icon="sun" class="w-5 h-5 hidden" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
              <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 5V3m0 18v-2M7.05 7.05 5.636 5.636m12.728 12.728L16.95 16.95M5 12H3m18 0h-2M7.05 16.95l-1.414 1.414M18.364 5.636 16.95 7.05M16 12a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"/>
            </svg>
            <span class="sr-only">Toggle dark/light mode</span>
          </button>
          {{ if $id }}
          <div id="{{ $id }}-toggle-dark-mode-tooltip" role="tooltip" class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white transition-opacity duration-300 bg-dark rounded-lg shadow-xs opacity-0 tooltip">
              <span class="tooltip-text">Toggle dark mode</span>
              <div class="tooltip-arrow" data-popper-arrow></div>
          </div>
          {{ end }}
        {{- end -}}
      </div>
    </div>
  </div>

  <div class="code-preview-wrapper">
    <div{{ with .Get "id" }} id="{{ . }}"{{ end }} class="flex p-0 bg-neutral-primary border-default code-preview border-x dark:bg-linear-to-t from-0% from-brand/8 to-[8rem] to-primary">
      <div class="w-full bg-cover bg-no-repeat bg-center dark:bg-[image:var(--squares-pattern-dark-url)] bg-[image:var(--squares-pattern-light-url)]">
        <iframe {{ if $id }}title="{{ replace $id "-" " "}}"{{ end }} class="w-full h-0 mx-auto bg-neutral-primary iframe-code" {{ if $iframeMaxHeight }}style='max-height: {{  sub (int $iframeMaxHeight) 40 }}px'{{ end }} srcdoc="<!DOCTYPE html><html lang='en' data-theme='modern'><head><meta charset='UTF-8'><meta name='viewport' content='width=device-width, initial-scale=1.0'><link rel='stylesheet' id='theme' href='{{ .Site.BaseURL }}main.css?v=4.0.2'></head><body {{ if $iframeHeight }}style='height: {{  sub (int $iframeHeight) 40 }}px'{{ end }} class='p-5 bg-neutral-primary antialiased {{ if $bodyClass }}{{ $bodyClass }}{{ end }}'><div id='exampleWrapper' class='{{ if $class }}{{ $class }}{{ end }}'>{{- $input | safeHTMLAttr -}}{{ if $skeletonPlaceholders }}{{ $skeletonPlaceholdersMarkup }}{{ end }}</div><script src='{{ .Site.BaseURL }}flowbite.min.js'></script>{{ if $charts }}<script src='https://cdn.jsdelivr.net/npm/apexcharts@3.46.0/dist/apexcharts.min.js'></script>{{ end }}{{ if $datatables }}<script src='https://cdn.jsdelivr.net/npm/simple-datatables@9.0.4'></script>{{ end }}<script>window.onload = function () { const anchorTags = document.querySelectorAll('a'); anchorTags.forEach(function(a){a.addEventListener('click', function(ev){ev.preventDefault();})}); {{ if not $disable_init_js }} const dropdownEl = document.querySelector('[data-dropdown-toggle]'); if (dropdownEl) {dropdownEl.click();} const modalEl = document.querySelector('[data-modal-toggle]'); if(modalEl) {modalEl.click(); } {{ if $initDatepicker }} const datepickerEl = document.querySelector('[datepicker]'); if (datepickerEl) { datepickerEl.focus({preventScroll: true}); } {{ end }} const dateRangePickerEl = document.querySelector('[data-rangepicker] input'); if (dateRangePickerEl) { dateRangePickerEl.focus(); } const drawerEl = document.querySelector('[data-drawer-show]'); if (drawerEl) { drawerEl.click(); } {{ end }} }</script>{{ if $wysiwyg }}<script type='importmap'>{{ $wysiwyg_json_fix | safeHTML }}</script>{{ end }}{{ if $javascript }} <script defer {{ if $script_module }}type='module'{{ end }}>
  {{ if $loadJavascriptListener }}
  window.addEventListener('load', function() {
    const checkForDataLoaded = function() {
      if (document.documentElement.hasAttribute('data-loaded')) {
        {{ $javascript }}
      } else {
        setTimeout(checkForDataLoaded, 50);
      }
    };
    checkForDataLoaded();
  });
  {{ else }}
  {{ $javascript }}
  {{ end }}
</script>{{ end }}</body></html>" frameborder="0"></iframe>
        <div class="flex items-center justify-center w-full p-5 bg-neutral-primary" data-component-loader>
          <div role="status">
            <svg aria-hidden="true" class="w-8 h-8 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-brand" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
                <path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor"/>
                <path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="currentFill"/>
            </svg>
            <span class="sr-only">Loading...</span>
        </div>
      </div>
      </div>
    </div>
  </div>
  {{- end -}}

  {{- if eq $show_markup true -}}
    {{- $content := replaceRE `<svg class="bd\-placeholder\-img(?:\-lg)?(?: *?bd\-placeholder\-img\-lg)? ?(.*?)".*?<\/svg>\n` `<img src="..." class="$1" alt="...">` $input -}}
    {{- $content = replaceRE ` (class=" *?")` "" $content -}}
      <div class="code-syntax-wrapper rounded-b-base">
        <div class="relative border-default border-y border-x code-syntax rounded-b-base">
            <div class="grid w-full grid-cols-2 border-b border-default bg-neutral-secondary-soft rounded-t-md">
              <ul class="flex text-sm font-medium text-center text-body">
                <li>
                  <button type="button" data-toggle-html-code class="inline-block w-full p-2 px-3 text-heading bg-neutral-secondary-soft hover:bg-neutral-tertiary border-r border-default">HTML</button>
                </li>
                {{ if $javascript }}
                  <li>
                    <button type="button" data-toggle-javascript-code class="inline-block w-full p-2 px-3 text-heading bg-neutral-secondary-soft hover:bg-neutral-tertiary border-r border-default">JavaScript</button>
                  </li>
                {{ end }}
              </ul>
              <div class="flex justify-end">
                <button {{ if $id }} data-tooltip-target="{{ $id }}-copy-clipboard-tooltip" data-clipboard-content-type="html" data-tooltip-placement="top"{{ end }} type="button" data-copy-state="copy" class="flex items-center px-3 py-2 text-xs font-medium text-body bg-neutral-secondary-soft hover:bg-neutral-tertiary hover:text-heading border-l border-default copy-to-clipboard-button">
                  <svg class="w-4 h-4 me-1.5 copy-icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linejoin="round" stroke-width="2" d="M9 8v3a1 1 0 0 1-1 1H5m11 4h2a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1h-7a1 1 0 0 0-1 1v1m4 3v10a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1v-7.13a1 1 0 0 1 .24-.65L7.7 8.35A1 1 0 0 1 8.46 8H13a1 1 0 0 1 1 1Z"/></svg>
                  <svg class="w-4 h-4 me-1.5 copied-icon hidden text-fg-success" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
                      <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 11.917 9.724 16.5 19 7.5"/>
                  </svg>
                  <span class="copy-text">Copy</span>
                </button>
                {{ if $id }}
                  <div id="{{ $id }}-copy-clipboard-tooltip" role="tooltip" class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white transition-opacity duration-300 bg-dark rounded-lg shadow-xs opacity-0 tooltip">
                      Copy to clipboard
                      <div class="tooltip-arrow" data-popper-arrow></div>
                  </div>
                {{ end }}
                <div class="hidden" data-clipboard-content-html="{{- $content -}}" data-clipboard-content-javascript="{{- $javascript -}}">
                  {{- $input -}}
                </div>
              </div>
            </div>
          <div class="relative">
            <div data-code-wrapper class="overflow-hidden max-h-72 rounded-b-base" tabindex="-1">
              <div data-code-wrapper-html>
                <code class="shiki-code-block dark:[&>pre]:!bg-neutral-primary [&>pre]:p-6 [&>pre]:text-sm [&>pre]:overflow-x-scroll" data-language="{{$lang}}">{{- trim $content "\n" -}}</code>
              </div>
              {{ if $javascript }}
                <div data-code-wrapper-javascript class="hidden">
                  <code class="shiki-code-block dark:[&>pre]:!bg-neutral-primary [&>pre]:p-6 [&>pre]:text-sm [&>pre]:overflow-x-scroll" data-language="javascript">{{- trim $javascript "\n" -}}</code>
                </div>
              {{ end }}
            </div>
            <button data-expand-code type="button" class="hidden absolute bottom-0 left-0 py-2.5 px-5 w-full text-sm font-medium rounded-b-base text-body bg-neutral-secondary-soft border-t border-default hover:bg-neutral-tertiary hover:text-heading">Expand code</button>
          </div>
        </div>
      </div>
  {{- end -}}
  
</div>
