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

$params: (
   "color": global.$body-color,
   "font-size": global.$font-size-base,
   "font-weight": global.$font-weight-base,
   "line-height": global.$line-height-sm,
   "margin": 0 0 global.$spacer 0
);

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

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

.#{component("Product:Annotation", "class")} {
   color: map.get($params, "color");
   font-size: map.get($params, "font-size");
   font-weight: map.get($params, "font-weight");
   line-height: map.get($params, "line-height");
   margin: map.get($params, "margin");
}
