<script setup>
import { computed } from "vue";
import { maestroCoreVersions } from "../composables/useAppSettings.js";

const coreVersionLine = computed(() => {
  const { npm, composer } = maestroCoreVersions;
  if (!npm && !composer) {
    return null;
  }
  const bits = [];
  if (composer) {
    bits.push(`Composer ${composer}`);
  }
  if (npm) {
    bits.push(`npm ${npm}`);
  }
  return bits.length ? `@maestro/core — ${bits.join(" · ")}` : null;
});
</script>

<template>
  <div class="layout-footer">
    <div class="footer-logo-container" />
    <span class="footer-copyright">&#169; Build2Connect - 2026</span>
    <span
      v-if="coreVersionLine"
      class="footer-core-versions"
      aria-label="Maestro Core package versions"
    >
      {{ coreVersionLine }}
    </span>
  </div>
</template>
