<template>
    <button v-ripple :class="cx('last')" type="button" v-bind="getPTOptions('last')" data-pc-group-section="pagebutton">
        <component :is="template || 'AngleDoubleRight'" :class="cx('lastIcon')" v-bind="getPTOptions('lastIcon')" />
    </button>
</template>

<script>
import BaseComponent from '@primevue/core/basecomponent';
import AngleDoubleRight from '@primeicons/vue/angle-double-right';
import Ripple from 'primevue/ripple';

export default {
    name: 'LastPageLink',
    hostName: 'Paginator',
    extends: BaseComponent,
    props: {
        template: {
            type: Function,
            default: null
        }
    },
    methods: {
        getPTOptions(key) {
            return this.ptm(key, {
                context: {
                    disabled: this.$attrs.disabled
                }
            });
        }
    },
    components: {
        AngleDoubleRight: AngleDoubleRight
    },
    directives: {
        ripple: Ripple
    }
};
</script>
