<template>
    <component v-if="!asChild" :is="as" :class="cx('root')" :type="as === 'BUTTON' ? 'button' : undefined" data-action="rotate-right" @click="onClick" v-bind="ptmi('root')">
        <slot />
    </component>
    <slot v-else :class="cx('root')" :onClick="onClick" />
</template>

<script>
import BaseGalleryRotateRight from './BaseGalleryRotateRight.vue';

export default {
    name: 'GalleryRotateRight',
    extends: BaseGalleryRotateRight,
    inheritAttrs: false,
    inject: ['$pcGallery'],
    methods: {
        onClick() {
            this.$pcGallery?.onClickAction('rotateRight');
        }
    }
};
</script>
