<script setup lang="ts">
import type { ListItemDto } from '~/components/pub/my-ui/data/types';

const props = defineProps<{
  url: string
  btnTxt?: string
  rec: ListItemDto
}>()

function handlePrint() {
   navigateTo(props.url || 'https://google.com', {external: true,open: { target: "_blank" },});
}
</script>

<template>
  <Button 
    class="gap-3 items-center border-orange-400 text-orange-400"
    variant="outline" @click="handlePrint">
    <Icon name="i-lucide-printer" class="h-4 w-4" />
    {{ props.btnTxt || 'Lampiran' }}
  </Button>
</template>