<template>
  <Capsule
    v-bind="{ ...getAttrs($attrs), ...$props }"
    :categories-config="m_categoriesConfig"
    :scaffold-overrides="m_capsuleOverrides"
    :bookmark-enabled="true"
    :to="{ name: 'OfferPage', params: { slug: slug[0] } }"
    date-key="published_at"
  />
</template>

<script>
import Capsule from '@inside-news/components/lib/Capsule'
import CapsuleOverridesMixin from '../../mixins/offer-categories-overrides-mixin'

import { getAttrs } from '@inside-library/helpers/Attrs'

export default {
  name: 'OfferCapsule',
  components: { Capsule },
  mixins: [CapsuleOverridesMixin],
  props: {
    image: {
      type: Object
    },
    slug: {
      type: Array,
      required: true
    }
  },
  methods: {
    getAttrs
  }
}
</script>
