<template lang="pug">
.sidebar--messages
  h5.message__title matches
  router-link(
        :to="`/chat/${match.profile.profile_id}`" 
        v-for='match in matches' 
        :key='match.profile.profile_id' 
        :class="[pid == match.profile.profile_id ? 'active' : '', 'sidebar__message', 'f-col', 'start']"
    )
    img(:src='match.profile.avatar' style="max-height:100px")
    .message__right
        h4.message__name {{ match.profile.name }}
        p.message__content {{ match.profile }}
</template>

<script>
import { mixins } from '../utils'

export default {
    name: 'ProfileMessages',
    mixins: [mixins.pidMixin],
    props: {
        matches: {
            type: [Object, Array],
            default: () => [],
        },
    },
}
</script>
