@use "sass:list";

@function opacity-button-bg(
  $bg,
  $transparent: false,
  $opacity: (0.2, 0.3, 0.35)
) {
  $opacity-main: list.nth($opacity, 1);
  $opacity-hover: list.nth($opacity, 2);
  $opacity-active: list.nth($opacity, 1);

  @return (
    "main": rgba($bg, if($transparent, 0, $opacity-main)),
    "active": rgba($bg, $opacity-active),
    "hover": rgba($bg, $opacity-hover),
    "transparent": rgba($bg, 0)
  );
}

@function filled-button-bg($bg, $mode: "dark") {
  @return ("active": darken($bg, 12%), "hover": darken($bg, 7%), "main": $bg);
}
