export default defineNuxtPlugin((nuxtApp) => {
  let userAgent = '';
  
  if (process.server) {
    const headers = useRequestHeaders();
    userAgent = headers['user-agent'] || '';
  } else {
    userAgent = navigator.userAgent || '';
  }

  nuxtApp.provide('userAgent', userAgent);
});