@use "sass:map";
@use "@twig/scss/_global" as global;
@use "@twig/scss/variables/_variables-components" as components;

$params: (
   "padding": 20px 0,
   "li-padding": 0 global.$spacer 0 0,
   "li-color": global.$text-muted,

   "border-top": global.$border-width solid global.$border-color-dark,
);

@if global-variable-exists(c-menu, components) {
   $keys: map.keys(components.$c-menu);
   @each $name in $keys {
      @if not map.get($params, $name) {
         @warn "Neexistující proměnná '#{$name}' v komponentě '$#{component("Menu", "class")}'.";
      }
   }

   $params: map.merge($params, components.$c-menu);
}

.#{component('Menu', 'class')} {
   display: flex;

   p {
      margin-bottom: 0;
   }

   a {
      @include global.underline-hover;
   }

   li {
      padding: map.get($params, "li-padding");
      color: map.get($params, "li-color");
   }
}
