import { mixins } from 'vue-class-component'; import { Vue, Component, Prop } from 'vue-property-decorator'; import LangMixin from '../mixins/LangMixin'; /** * Buttons at the top of the table */ @Component({ name: 'header-buttons', }) export default class HeaderButtons extends mixins(LangMixin) { /** * An array of object representing the headers (name of columns and extra information) */ @Prop({ type: Array, required: true }) readonly headers!: any[]; /** * Internal state of the component */ state: {[key: string]: any} = { search: '', }; /** * Method emitting a search event when a seach is conducted on the searchbar */ searchData(e: any) { this.$emit('search', e); } /** * Method emitting a next event when the next button for a card is pressed */ nextCard() { this.$emit('next'); } /** * Method emitting a previous event when the previous button for a card is pressed */ previousCard() { this.$emit('previous'); } }