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

defineProps<{
    tooltip?: string;
    disabled?: boolean;
    size?: 'default' | 'sm';
}>();

defineEmits(['click']);
</script>

<template>
    <Tooltip>
        <TooltipTrigger as-child>
            <Button variant="ghost" :size="size === 'sm' ? 'sm' : 'icon'"
                :class="size === 'sm' ? '' : 'size-8'" class="text-blue-600 hover:text-blue-700" :disabled="disabled"
                @click="$emit('click')">
                <Send :class="size === 'sm' ? 'size-3.5' : 'size-4'" />
                <span class="sr-only">{{ tooltip || 'Submit' }}</span>
            </Button>
        </TooltipTrigger>
        <TooltipContent>{{ tooltip || 'Submit' }}</TooltipContent>
    </Tooltip>
</template>
