<script>
import { GlSprintf, GlLink } from '@gitlab/ui';
import { s__ } from '~/locale';
import CsvExportButton from '../csv_export_button.vue';

export default {
  components: { GlSprintf, GlLink, CsvExportButton },
  inject: ['dashboardDocumentation'],
  i18n: {
    title: s__('SecurityReports|Vulnerability Report'),
    description: s__(
      "SecurityReports|The Vulnerability Report shows the results of the latest successful pipeline on your project's default branch, as well as vulnerabilities from your latest container scan. %{linkStart}Learn more.%{linkEnd}",
    ),
  },
};
</script>

<template>
  <header>
    <h2 class="gl-display-flex">
      {{ $options.i18n.title }}
      <csv-export-button class="gl-ml-auto" />
    </h2>

    <gl-sprintf :message="$options.i18n.description">
      <template #link="{ content }">
        <gl-link :href="dashboardDocumentation" target="_blank">{{ content }}</gl-link>
      </template>
    </gl-sprintf>
  </header>
</template>
