---
import type { Pdf } from '@/types/pdf';

export interface Props {
  footer: Pdf['footer'];
}

const { footer } = Astro.props;
---

<div
  id="footer"
  class="mt-4 flex w-full justify-center rounded border border-gray-100 bg-gray-50 px-2 py-1 text-justify text-[11px]"
>
  {footer}
</div>
<script>
  const footer = document.getElementById('footer')!;
  const withClause = window.location.search.includes('clause');

  if (!withClause) {
    footer.remove();
  }
</script>
