<script setup>
import { defineAsyncComponent } from 'vue'

const size375 = defineAsyncComponent(() => import("@/views/press-releases/index.vue"));
const size768 = defineAsyncComponent(() => import("@/views/press-releases/index.vue"));
const size1440 = defineAsyncComponent(() => import("@/views/press-releases/index.vue"));
const size1920 = defineAsyncComponent(() => import("@/views/press-releases/index.vue"));

const { viewComponent, componentKey } = useViewSelector({
  size375,
  size768,
  size1440,
  size1920,
});

const bg = usePageBackground("bg-events-calendar.png");

definePageMeta({
  layout: "default",
});

const route = useRoute();
watch(
  bg,
  (newBg) => {
    if (route.meta) {
      route.meta.bg = newBg;
    }
  },
  { immediate: true }
);

useSeoMeta({
  title: "Press Releases | Corporate Announcements | FiEE",
  description:
    "Official corporate news, media announcements, and press releases from FiEE.",
  ogTitle: "FiEE Press Releases",
});
</script>

<template>
  <component :is="viewComponent" :key="componentKey" />
</template>
