<template>
  <div class="mobile-header">
    <SideBarLogo
      :logo-url="tenantMake.logo_url"
      :make-name="tenantMake.name"
      class="mobile-logo"
    />
  </div>
</template>

<script setup>
import SideBarLogo from './SideBarLogo.vue';

const props = defineProps({
  tenantMake: {
    type: Object,
    default: () => ({
      name: '',
      logo_url: '',
      subtitle: ''
    })
  },
  initialLanguage: {
    type: String,
    default: 'en'
  },
  supportedLanguageDetails: {
    type: Object,
    default: () => ({})
  },
  allowedLanguages: {
    type: Array,
    default: () => ['nl', 'en', 'fr', 'de']
  },
  apiPrefix: {
    type: String,
    default: ''
  }
});

// Mobile header toont enkel het logo; taalkeuze gebeurt via de Setup-tab.
</script>

<style scoped>
.mobile-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 10px 15px;
  background: var(--sidebar-background);
  color: var(--sidebar-color);
  border-bottom: 1px solid rgba(0,0,0,0.1);
  min-height: 60px;
  max-width: 100%;
  overflow: hidden;
}

/* Mobile logo container - meer specifieke styling */
.mobile-logo {
  flex-shrink: 1;             /* allow logo area to shrink */
  min-width: 0;               /* allow shrinking below intrinsic width */
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  height: 50px; /* Vaste hoogte voor consistentie */
}

/* Diepere styling voor het logo component */
.mobile-logo :deep(.sidebar-logo) {
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  height: 100% !important;
  min-width: 0 !important;    /* allow inner content to shrink */
}

.mobile-logo :deep(.logo-image) {
  max-height: 40px !important;
  max-width: 120px !important;
  height: auto !important;
  width: auto !important;
  object-fit: contain !important;
  display: block !important;
}

.mobile-logo :deep(.logo-placeholder) {
  width: 40px !important;
  height: 40px !important;
  font-size: 1rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}


/* Media queries voor responsiviteit */
@media (max-width: 768px) {
  .mobile-header {
    display: flex;
  }
}

@media (min-width: 769px) {
  .mobile-header {
    display: none;
  }
}
</style>