@use "sass:map";

@use "../../../mixins" as *;
@use "../../../utils" as *;
@use "../../palette" as *;
@use "../../text" as *;

$headerbar-default-accent: (
  "dark": (
    "label-fg": fg(muted, dark),
    "value-fg": fg(core, dark),
    "border": rgba(#000, 0.37),
    "bg": (
      "outline": #78aeed,
      "overlay": transparent,
      "main": #434343,
    ),
  ),
  "light": (
    "label-fg": fg(muted, light),
    "value-fg": fg(base, dark),
    "border": rgba(#000, 0.07),
    "bg": (
      "outline": pcolor(blue, 4),
      "overlay": transparent,
      "main": #fff,
    ),
  ),
) !default;

@function map-to-headerbar($theme, $accent, $colors) {
  $bg: map.get($colors, "bg");

  @return (
    "label-fg": fg-src($bg, muted),
    "value-fg": fg-src($bg, base),
    "border": rgba($bg, 0.07),
    "bg": (
      "overlay": rgba($bg, 0.08),
      "outline": $bg,
    )
  );
}
