<template>
  <div
      v-for="(item, index) in componentData.data"
      class="flex flex-col rounded-xl"
      :key="index"
      :ref="index === componentData.data.length - 1 ? (el) => (lastItemRef = el) : null"
  >
    <VButton :button="item"/>
  </div>
</template>
<script setup>
import {ref} from "vue";
import {defaultProps} from "@/components/helpers/defaultProps";
import VButton from "@/components/common/Button.vue";

const emit = defineEmits(["update"]);
const props = defineProps({
  ...defaultProps,
});

const componentData = ref(props.data.component);
const lastItemRef = ref(null);


</script>
