<template>
  <pkt-alert :skin="skin" :closeAlert="closeAlert" :title="title" :date="date" :ariaLive="ariaLive" :compact="compact">
    <slot />
  </pkt-alert>
</template>

<script>
import '@oslokommune/punkt-elements/dist/pkt-alert'
export default {
  name: 'PktAlert',
  props: {
    skin: {
      type: String,
      default: 'info',
      validator(value) {
        return ['error', 'success', 'warning', 'info'].includes(value)
      },
    },
    closeAlert: {
      type: Boolean,
      default: false,
    },
    title: {
      type: String,
      default: '',
    },
    date: {
      type: String,
      default: '',
    },
    ariaLive: {
      type: String,
      default: 'polite',
      validator(value) {
        return ['off', 'polite', 'assertive'].includes(value)
      },
    },
    compact: {
      type: Boolean,
      default: false,
    },
  },
}
</script>
