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

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

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