<script setup lang="ts">
import { ArrowLeftRight } from '@lucide/vue';
import { Button } from '@/components/ui/button';
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';

defineProps<{
    tooltip?: string;
    disabled?: boolean;
    tooltipClass?: string;
}>();

const emit = defineEmits<{
    click: [];
}>();
</script>

<template>
    <Tooltip>
        <TooltipTrigger as-child>
            <Button
                variant="ghost"
                size="icon"
                class="size-8"
                :disabled="disabled"
                @click="emit('click')"
            >
                <ArrowLeftRight class="size-4" />
                <span class="sr-only">{{ tooltip || 'Transfer Stok Ecer' }}</span>
            </Button>
        </TooltipTrigger>
        <TooltipContent :class="tooltipClass">{{ tooltip || 'Transfer Stok Ecer' }}</TooltipContent>
    </Tooltip>
</template>
