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

$params: (
   "border-radius": global.$border-radius-base
);

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

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

.#{component("ProductList:CatalogPicture", "class")} {
   display: block;

   img {
      border-radius: map.get($params, "border-radius");
   }
}
