<template>
    <alert
      id="perfect-match-alert"
      alertClass="alert-success"
      cmsWidgetName="AlertPerfectMatchInsuranceNotVerified"
      :manualCopy="body"
      aria-label="perfect-match-alert" />
  </template>
<script>
import alert from '@/ux-components/alert/alert.vue';
import { getDamageString } from '@/helpers/damage-helper';

export default {
    name: 'perfect-match-alert',
    components: {
        alert
    },
    inject: ['vehicleFromLookup'],
    computed: {
        body() {
            return (
                this.getCmsContent('AlertPerfectMatchInsuranceNotVerified', 'BodyText')
                    .replaceAll('{custom:damage}', getDamageString())
            );
        }
    }
};
</script>
<style>
/**
  Override wrong margin-bottom rule in the Alert component.
*/
#perfect-match-found-alert p:last-of-type {
  margin-bottom: 0 !important;
}
</style>
