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

$params: (
   "gap": global.$gap-width,
   "margin" : 0 0 global.$spacer-lg,
);

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

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

.#{component("Account:UserDashboard", "class")} {
   container-type: inline-size;
   display: flex;
   flex-wrap: wrap;
   gap: map.get($params, 'gap');


   &:has(> *) {
      margin: map.get($params, 'margin');
   }
}
