import { useHomeStore } from "@/stores/home";
export default defineNuxtPlugin(async () => {
  const home = useHomeStore();
  try {
    // If not loaded yet, fetch once before pages render (SSR + CSR)
    if (!home.websiteData) {
      await home.getWebsiteData();
    }
  } catch (e) {
    // Fail silently to avoid breaking render; meta fallbacks will apply
    console.error('[init-website-data] Failed to fetch website data', e);
  }
});
