<template>
  <div :class="['preview-content', 'pdf-content']" :id="'pre' + rnd">
    <uye-onizleme-display />
  </div>
</template>
<script setup lang="ts">
  import { ref, onMounted } from 'vue'

  import UyeOnizlemeDisplay from '../display/UyeOnizlemeDisplay.vue'

  export interface Props {
    id?: number
  }

  const props = withDefaults(defineProps<Props>(), {})
  const emit = defineEmits(['update:id'])

  const rnd = ref<number>(Number(Math.floor(Math.random() * 1000000000)))
  const localId = ref<number>(rnd.value)

  onMounted(() => {
    if (props.id !== undefined) emit('update:id', localId.value)
  })
</script>
