<template>
  <div
    class="document-form"
    ref="documentform"
  >
    <document-input
      :url="value.url"
      @update="updateUrl"
    />
  </div>
</template>

<script setup lang="ts">
import DocumentInput from '@/components/content-forms/DocumentInput.vue';
export interface Props {
  value: any;
  index: number;
}

const props = defineProps<Props>();
const emit = defineEmits(['change-url']);

const updateUrl = (url: string) => {
  emit('change-url', url, props.index);
};
</script>
