<template>
    <span :class="cx('current')" v-bind="ptm('current')">{{ text }}</span>
</template>

<script>
import BaseComponent from 'primevue/basecomponent';

export default {
    name: 'CurrentPageReport',
    hostName: 'Paginator',
    extends: BaseComponent,
    props: {
        pageCount: {
            type: Number,
            default: 0
        },
        currentPage: {
            type: Number,
            default: 0
        },
        total: {
            type: Number,
            default: 0
        },
        template: {
            type: String,
            default: '{currentPage} / {pageCount}'
        }
    },
    computed: {
        text() {
            let text = this.template
                .replace('{currentPage}', this.currentPage)
                .replace('{pageCount}', this.pageCount)
                .replace('{total}', this.total);

                return text;
        }
    }
};
</script>
