<script setup="setup">

const { etherpadApiUrl } = useEtherpadApi()
const { naslov, guid } = useRoute().params
const { getRandomUUID } = useCrypto()

const revisionId = ref(null)

revisionId.value = guid ?? getRandomUUID()

// Ustvari nov, prazen pad
// @TODO parameter za seranje linka?
const padId = revisionId.value
const resp = await $fetch(`${etherpadApiUrl}/createPad?padID=${padId}`)

</script>

<template>
  <div class="okvir">
    <Pojem :naslov="naslov" />
  </div>

  <NuxtLink class="gumb" :to="localePath('manifest') + '#skrol'">
    {{ $t('manifest') }}
  </NuxtLink>

  <br>
  <br>

</template>

<style>
  a {
    text-transform: capitalize;
  }
</style>
