<script setup lang="ts">
import type { TheSectionFragment } from "#graphql-operations";

const props = defineProps<{ sections: (TheSectionFragment | null)[] }>();
const sections = props.sections.filter(Boolean).map((section) => useSection(section!));
</script>

<template>
  <component :is="component" v-for="({ component, attrs }, i) in sections" :key="i" v-bind="attrs" />
</template>
