$button-normal-color: getCustomVar(("$button-normal-color")) !default;
$button-normal-bg: getCustomVar(("$button-normal-bg")) !default;
$button-normal-outlined-bg: getCustomVar(("$button-normal-outlined-bg")) !default;
$button-normal-text-bg: getCustomVar(("$button-normal-text-bg")) !default;
$button-normal-border-color: getCustomVar(("$button-normal-border-color")) !default;
$button-normal-contained-bg-selected: getCustomVar(("$button-normal-contained-bg-selected")) !default;
$button-normal-outlined-bg-selected: getCustomVar(("$button-normal-outlined-bg-selected")) !default;
$button-normal-text-bg-selected: getCustomVar(("$button-normal-text-bg-selected")) !default;
$button-default-color: getCustomVar(("$button-default-color")) !default;
$button-default-bg: getCustomVar(("$button-default-bg")) !default;
$button-default-border-color: getCustomVar(("$button-default-border-color")) !default;
$button-default-contained-bg-selected: getCustomVar(("$button-default-contained-bg-selected")) !default;
$button-default-outlined-color: getCustomVar(("$button-default-outlined-color")) !default;
$button-default-outlined-bg-selected: getCustomVar(("$button-default-outlined-bg-selected")) !default;
$button-default-text-color: getCustomVar(("$button-default-text-color")) !default;
$button-default-text-bg-selected: getCustomVar(("$button-default-text-bg-selected")) !default;
$button-danger-color: getCustomVar(("$button-danger-color")) !default;
$button-danger-bg: getCustomVar(("$button-danger-bg")) !default;
$button-danger-border-color: getCustomVar(("$button-danger-border-color")) !default;
$button-danger-contained-bg-selected: getCustomVar(("$button-danger-contained-bg-selected")) !default;
$button-danger-outlined-bg-selected: getCustomVar(("$button-danger-outlined-bg-selected")) !default;
$button-danger-text-bg-selected: getCustomVar(("$button-danger-text-bg-selected")) !default;
$button-success-color: getCustomVar(("$button-success-color")) !default;
$button-success-bg: getCustomVar(("$button-success-bg")) !default;
$button-success-border-color: getCustomVar(("$button-success-border-color")) !default;
$button-success-contained-bg-selected: getCustomVar(("$button-success-contained-bg-selected")) !default;
$button-success-outlined-bg-selected: getCustomVar(("$button-success-outlined-bg-selected")) !default;
$button-success-text-bg-selected: getCustomVar(("$button-success-text-bg-selected")) !default;

@use "sass:color";
@use "../sizes" as *;
@use "../colors" as *;

// adduse

$button-border-radius: $base-border-radius !default;
$button-normal-color: $base-text-color !default;
$button-normal-bg: null !default;
$button-normal-outlined-bg: null !default;
$button-normal-text-bg: null !default;
$button-normal-border-color: null !default;
$button-normal-bg-inverted: null !default;
$button-normal-contained-bg-hover: null !default;
$button-normal-contained-bg-focused: null !default;
$button-normal-contained-bg-active: null !default;
$button-normal-contained-bg-selected: null !default;
$button-normal-outlined-bg-hover: null !default;
$button-normal-outlined-bg-focused: null !default;
$button-normal-outlined-bg-active: null !default;
$button-normal-outlined-bg-selected: null !default;
$button-normal-text-bg-hover: null !default;
$button-normal-text-bg-focused: null !default;
$button-normal-text-bg-active: null !default;
$button-normal-text-bg-selected: null !default;
$button-default-color: $base-inverted-text-color !default;
$button-default-bg: null !default;
$button-default-border-color: null !default;
$button-default-contained-bg-hover: null !default;
$button-default-contained-bg-focused: null !default;
$button-default-contained-bg-active: null !default;
$button-default-contained-bg-selected: null !default;
$button-default-outlined-color: null !default;
$button-default-outlined-bg-hover: null !default;
$button-default-outlined-bg-focused: null !default;
$button-default-outlined-bg-active: null !default;
$button-default-outlined-bg-selected: null !default;
$button-default-text-color: null !default;
$button-default-text-bg-hover: null !default;
$button-default-text-bg-focused: null !default;
$button-default-text-bg-active: null !default;
$button-default-text-bg-selected: null !default;
$button-danger-color: $base-inverted-text-color !default;
$button-danger-bg: $base-danger !default;
$button-danger-border-color: null !default;
$button-danger-contained-bg-hover: null !default;
$button-danger-contained-bg-focused: null !default;
$button-danger-contained-bg-active: null !default;
$button-danger-contained-bg-selected: null !default;
$button-danger-outlined-bg-hover: null !default;
$button-danger-outlined-bg-focused: null !default;
$button-danger-outlined-bg-active: null !default;
$button-danger-outlined-bg-selected: null !default;
$button-danger-text-bg-hover: null !default;
$button-danger-text-bg-focused: null !default;
$button-danger-text-bg-active: null !default;
$button-danger-text-bg-selected: null !default;
$button-success-color: $base-inverted-text-color !default;
$button-success-bg: $base-success !default;
$button-success-border-color: null !default;
$button-success-contained-bg-hover: null !default;
$button-success-contained-bg-focused: null !default;
$button-success-contained-bg-active: null !default;
$button-success-contained-bg-selected: null !default;
$button-success-outlined-bg-hover: null !default;
$button-success-outlined-bg-focused: null !default;
$button-success-outlined-bg-active: null !default;
$button-success-outlined-bg-selected: null !default;
$button-success-text-bg-hover: null !default;
$button-success-text-bg-focused: null !default;
$button-success-text-bg-active: null !default;
$button-success-text-bg-selected: null !default;

@if $color == "carmine" {
  $button-normal-bg: $base-element-bg !default;
  $button-normal-border-color: darken($base-border-color, 17%) !default;
  $button-normal-bg-inverted: darken($button-normal-bg, 100%) !default;
  $button-normal-contained-bg-hover: darken($button-normal-bg, 4%) !default;
  $button-normal-contained-bg-focused: darken($button-normal-bg, 8%) !default;
  $button-normal-contained-bg-active: darken($button-normal-bg, 24%) !default;
  $button-normal-contained-bg-selected: darken($button-normal-bg, 17%) !default;
  $button-normal-outlined-bg: color.change($button-normal-bg-inverted, $alpha: 0) !default;
  $button-normal-outlined-bg-hover: color.change($button-normal-outlined-bg, $alpha: 0.04) !default;
  $button-normal-outlined-bg-focused: color.change($button-normal-outlined-bg, $alpha: 0.08) !default;
  $button-normal-outlined-bg-active: color.change($button-normal-outlined-bg, $alpha: 0.24) !default;
  $button-normal-outlined-bg-selected: color.change($button-normal-outlined-bg, $alpha: 0.17) !default;
  $button-normal-text-bg: color.change($button-normal-bg-inverted, $alpha: 0) !default;
  $button-normal-text-bg-hover: color.change($button-normal-text-bg, $alpha: 0.04) !default;
  $button-normal-text-bg-focused: color.change($button-normal-text-bg, $alpha: 0.08) !default;
  $button-normal-text-bg-active: color.change($button-normal-text-bg, $alpha: 0.24) !default;
  $button-normal-text-bg-selected: color.change($button-normal-text-bg, $alpha: 0.17) !default;
  $button-default-bg: $base-accent !default;
  $button-default-border-color: darken($button-default-bg, 5%) !default;
  $button-default-contained-bg-hover: darken($button-default-bg, 9%) !default;
  $button-default-contained-bg-focused: darken($button-default-bg, 12%) !default;
  $button-default-contained-bg-active: darken($button-default-bg, 23%) !default;
  $button-default-contained-bg-selected: darken($button-default-bg, 17%) !default;
  $button-default-outlined-color: darken($button-default-bg, 5%) !default;
  $button-default-outlined-bg-hover: color.change($button-default-border-color, $alpha: 0.1) !default;
  $button-default-outlined-bg-focused: color.change($button-default-border-color, $alpha: 0.1) !default;
  $button-default-outlined-bg-active: color.change($button-default-border-color, $alpha: 0.4) !default;
  $button-default-outlined-bg-selected: color.change($button-default-bg, $alpha: 0.3) !default;
  $button-default-text-color: darken($button-default-bg, 5%) !default;
  $button-default-text-bg-hover: $button-default-outlined-bg-hover !default;
  $button-default-text-bg-focused: $button-default-outlined-bg-focused !default;
  $button-default-text-bg-active: $button-default-outlined-bg-active !default;
  $button-default-text-bg-selected: color.change($button-default-bg, $alpha: 0.3) !default;
  $button-danger-border-color: darken($button-danger-bg, 5%) !default;
  $button-danger-contained-bg-hover: darken($button-danger-bg, 9%) !default;
  $button-danger-contained-bg-focused: darken($button-danger-bg, 12%) !default;
  $button-danger-contained-bg-active: darken($button-danger-bg, 23%) !default;
  $button-danger-contained-bg-selected: darken($button-danger-bg, 17%) !default;
  $button-danger-outlined-bg-hover: color.change($button-danger-border-color, $alpha: 0.1) !default;
  $button-danger-outlined-bg-focused: color.change($button-danger-border-color, $alpha: 0.1) !default;
  $button-danger-outlined-bg-active: color.change($button-danger-border-color, $alpha: 0.4) !default;
  $button-danger-outlined-bg-selected: color.change($button-danger-bg, $alpha: 0.3) !default;
  $button-danger-text-bg-hover: $button-danger-outlined-bg-hover !default;
  $button-danger-text-bg-focused: $button-danger-outlined-bg-focused !default;
  $button-danger-text-bg-active: $button-danger-outlined-bg-active !default;
  $button-danger-text-bg-selected: color.change($button-danger-bg, $alpha: 0.3) !default;
  $button-success-border-color: darken($button-success-bg, 5%) !default;
  $button-success-contained-bg-hover: darken($button-success-bg, 9%) !default;
  $button-success-contained-bg-focused: darken($button-success-bg, 12%) !default;
  $button-success-contained-bg-active: darken($button-success-bg, 23%) !default;
  $button-success-contained-bg-selected: darken($button-success-bg, 17%) !default;
  $button-success-outlined-bg-hover: color.change($button-success-border-color, $alpha: 0.1) !default;
  $button-success-outlined-bg-focused: color.change($button-success-border-color, $alpha: 0.1) !default;
  $button-success-outlined-bg-active: color.change($button-success-border-color, $alpha: 0.4) !default;
  $button-success-outlined-bg-selected: color.change($button-success-bg, $alpha: 0.3) !default;
  $button-success-text-bg-hover: $button-success-outlined-bg-hover !default;
  $button-success-text-bg-focused: $button-success-outlined-bg-focused !default;
  $button-success-text-bg-active: $button-success-outlined-bg-active !default;
  $button-success-text-bg-selected: color.change($button-success-bg, $alpha: 0.3) !default;
}

@if $color == "contrast" {
  $button-normal-border-color: $base-border-color !default;
  $button-normal-bg: $base-bg !default;
  $button-normal-contained-bg-hover: $base-hover-color !default;
  $button-normal-contained-bg-focused: $base-focus-color !default;
  $button-normal-contained-bg-active: $button-normal-bg !default;
  $button-normal-contained-bg-selected: $base-hover-color !default;
  $button-normal-outlined-bg: $base-bg !default;
  $button-normal-outlined-bg-hover: $base-hover-color !default;
  $button-normal-outlined-bg-focused: $base-focus-color !default;
  $button-normal-outlined-bg-active: $button-normal-outlined-bg !default;
  $button-normal-outlined-bg-selected: $base-hover-color !default;
  $button-normal-text-bg: $base-bg !default;
  $button-normal-text-bg-hover: $base-hover-color !default;
  $button-normal-text-bg-focused: $base-focus-color !default;
  $button-normal-text-bg-active: $button-normal-text-bg !default;
  $button-normal-text-bg-selected: $base-hover-color !default;
  $button-default-border-color: $base-default !default;
  $button-default-bg: $base-default !default;
  $button-default-contained-bg-hover: $base-inverted-bg !default;
  $button-default-contained-bg-focused: $base-inverted-bg !default;
  $button-default-contained-bg-active: $button-default-bg !default;
  $button-default-contained-bg-selected: $base-inverted-bg !default;
  $button-default-outlined-color: $base-default !default;
  $button-default-outlined-bg-hover: $base-inverted-bg !default;
  $button-default-outlined-bg-focused: $base-inverted-bg !default;
  $button-default-outlined-bg-active: $base-bg !default;
  $button-default-outlined-bg-selected: $base-inverted-bg !default;
  $button-default-text-color: $base-default !default;
  $button-default-text-bg-hover: $base-inverted-bg !default;
  $button-default-text-bg-focused: $base-inverted-bg !default;
  $button-default-text-bg-active: $base-bg !default;
  $button-default-text-bg-selected: $base-inverted-bg !default;
  $button-danger-border-color: $button-danger-bg !default;
  $button-danger-contained-bg-hover: $base-inverted-bg !default;
  $button-danger-contained-bg-focused: $base-inverted-bg !default;
  $button-danger-contained-bg-active: $button-danger-bg !default;
  $button-danger-contained-bg-selected: $base-inverted-bg !default;
  $button-danger-outlined-bg-hover: $base-inverted-bg !default;
  $button-danger-outlined-bg-focused: $base-inverted-bg !default;
  $button-danger-outlined-bg-active: $base-bg !default;
  $button-danger-outlined-bg-selected: $base-inverted-bg !default;
  $button-danger-text-bg-hover: $base-inverted-bg !default;
  $button-danger-text-bg-focused: $base-inverted-bg !default;
  $button-danger-text-bg-active: $base-bg !default;
  $button-danger-text-bg-selected: $base-inverted-bg !default;
  $button-success-border-color: $button-success-bg !default;
  $button-success-contained-bg-hover: $base-inverted-bg !default;
  $button-success-contained-bg-focused: $base-inverted-bg !default;
  $button-success-contained-bg-active: $button-success-bg !default;
  $button-success-contained-bg-selected: $base-inverted-bg !default;
  $button-success-outlined-bg-hover: $base-inverted-bg !default;
  $button-success-outlined-bg-focused: $base-inverted-bg !default;
  $button-success-outlined-bg-active: $base-bg !default;
  $button-success-outlined-bg-selected: $base-inverted-bg !default;
  $button-success-text-bg-hover: $base-inverted-bg !default;
  $button-success-text-bg-focused: $base-inverted-bg !default;
  $button-success-text-bg-active: $base-bg !default;
  $button-success-text-bg-selected: $base-inverted-bg !default;
}

@if $color == "dark" {
  $button-normal-bg: $base-element-bg !default;
  $button-normal-border-color: $base-border-color !default;
  $button-normal-bg-inverted: lighten($button-normal-bg, 100%) !default;
  $button-normal-contained-bg-hover: lighten($button-normal-bg, 4%) !default;
  $button-normal-contained-bg-focused: lighten($button-normal-bg, 8%) !default;
  $button-normal-contained-bg-active: lighten($button-normal-bg, 24%) !default;
  $button-normal-contained-bg-selected: lighten($button-normal-bg, 17%) !default;
  $button-normal-outlined-bg: color.change($button-normal-bg-inverted, $alpha: 0) !default;
  $button-normal-outlined-bg-hover: color.change($button-normal-outlined-bg, $alpha: 0.04) !default;
  $button-normal-outlined-bg-focused: color.change($button-normal-outlined-bg, $alpha: 0.08) !default;
  $button-normal-outlined-bg-active: color.change($button-normal-outlined-bg, $alpha: 0.24) !default;
  $button-normal-outlined-bg-selected: color.change($button-normal-outlined-bg, $alpha: 0.17) !default;
  $button-normal-text-bg: color.change($button-normal-bg-inverted, $alpha: 0) !default;
  $button-normal-text-bg-hover: color.change($button-normal-text-bg, $alpha: 0.04) !default;
  $button-normal-text-bg-focused: color.change($button-normal-text-bg, $alpha: 0.08) !default;
  $button-normal-text-bg-active: color.change($button-normal-text-bg, $alpha: 0.24) !default;
  $button-normal-text-bg-selected: color.change($button-normal-text-bg, $alpha: 0.17) !default;
  $button-default-bg: $base-accent !default;
  $button-default-border-color: darken($button-default-bg, 5%) !default;
  $button-default-contained-bg-hover: lighten($button-default-bg, 9%) !default;
  $button-default-contained-bg-focused: lighten($button-default-bg, 12%) !default;
  $button-default-contained-bg-active: lighten($button-default-bg, 23%) !default;
  $button-default-contained-bg-selected: lighten($button-default-bg, 17%) !default;
  $button-default-outlined-color: darken($button-default-bg, 5%) !default;
  $button-default-outlined-bg-hover: color.change($button-default-border-color, $alpha: 0.1) !default;
  $button-default-outlined-bg-focused: color.change($button-default-border-color, $alpha: 0.1) !default;
  $button-default-outlined-bg-active: color.change($button-default-border-color, $alpha: 0.4) !default;
  $button-default-outlined-bg-selected: color.change($button-default-bg, $alpha: 0.3) !default;
  $button-default-text-color: darken($button-default-bg, 5%) !default;
  $button-default-text-bg-hover: $button-default-outlined-bg-hover !default;
  $button-default-text-bg-focused: $button-default-outlined-bg-focused !default;
  $button-default-text-bg-active: $button-default-outlined-bg-active !default;
  $button-default-text-bg-selected: color.change($button-default-bg, $alpha: 0.3) !default;
  $button-danger-border-color: darken($button-danger-bg, 5%) !default;
  $button-danger-contained-bg-hover: lighten($button-danger-bg, 9%) !default;
  $button-danger-contained-bg-focused: lighten($button-danger-bg, 12%) !default;
  $button-danger-contained-bg-active: lighten($button-danger-bg, 23%) !default;
  $button-danger-contained-bg-selected: lighten($button-danger-bg, 17%) !default;
  $button-danger-outlined-bg-hover: color.change($button-danger-border-color, $alpha: 0.1) !default;
  $button-danger-outlined-bg-focused: color.change($button-danger-border-color, $alpha: 0.1) !default;
  $button-danger-outlined-bg-active: color.change($button-danger-border-color, $alpha: 0.4) !default;
  $button-danger-outlined-bg-selected: color.change($button-danger-bg, $alpha: 0.3) !default;
  $button-danger-text-bg-hover: $button-danger-outlined-bg-hover !default;
  $button-danger-text-bg-focused: $button-danger-outlined-bg-focused !default;
  $button-danger-text-bg-active: $button-danger-outlined-bg-active !default;
  $button-danger-text-bg-selected: color.change($button-danger-bg, $alpha: 0.3) !default;
  $button-success-border-color: darken($button-success-bg, 5%) !default;
  $button-success-contained-bg-hover: lighten($button-success-bg, 9%) !default;
  $button-success-contained-bg-focused: lighten($button-success-bg, 12%) !default;
  $button-success-contained-bg-active: lighten($button-success-bg, 23%) !default;
  $button-success-contained-bg-selected: lighten($button-success-bg, 17%) !default;
  $button-success-outlined-bg-hover: color.change($button-success-border-color, $alpha: 0.1) !default;
  $button-success-outlined-bg-focused: color.change($button-success-border-color, $alpha: 0.1) !default;
  $button-success-outlined-bg-active: color.change($button-success-border-color, $alpha: 0.4) !default;
  $button-success-outlined-bg-selected: color.change($button-success-bg, $alpha: 0.3) !default;
  $button-success-text-bg-hover: $button-success-outlined-bg-hover !default;
  $button-success-text-bg-focused: $button-success-outlined-bg-focused !default;
  $button-success-text-bg-active: $button-success-outlined-bg-active !default;
  $button-success-text-bg-selected: color.change($button-success-bg, $alpha: 0.3) !default;
}

@if $color == "darkmoon" {
  $button-normal-bg: $base-element-bg !default;
  $button-normal-border-color: lighten($base-border-color, 13%) !default;
  $button-normal-bg-inverted: lighten($button-normal-bg, 100%) !default;
  $button-normal-contained-bg-hover: lighten($button-normal-bg, 4%) !default;
  $button-normal-contained-bg-focused: lighten($button-normal-bg, 8%) !default;
  $button-normal-contained-bg-active: lighten($button-normal-bg, 24%) !default;
  $button-normal-contained-bg-selected: lighten($button-normal-bg, 17%) !default;
  $button-normal-outlined-bg: color.change($button-normal-bg-inverted, $alpha: 0) !default;
  $button-normal-outlined-bg-hover: color.change($button-normal-outlined-bg, $alpha: 0.04) !default;
  $button-normal-outlined-bg-focused: color.change($button-normal-outlined-bg, $alpha: 0.08) !default;
  $button-normal-outlined-bg-active: color.change($button-normal-outlined-bg, $alpha: 0.24) !default;
  $button-normal-outlined-bg-selected: color.change($button-normal-outlined-bg, $alpha: 0.17) !default;
  $button-normal-text-bg: color.change($button-normal-bg-inverted, $alpha: 0) !default;
  $button-normal-text-bg-hover: color.change($button-normal-text-bg, $alpha: 0.04) !default;
  $button-normal-text-bg-focused: color.change($button-normal-text-bg, $alpha: 0.08) !default;
  $button-normal-text-bg-active: color.change($button-normal-text-bg, $alpha: 0.24) !default;
  $button-normal-text-bg-selected: color.change($button-normal-text-bg, $alpha: 0.17) !default;
  $button-default-bg: $base-accent !default;
  $button-default-border-color: darken($button-default-bg, 5%) !default;
  $button-default-contained-bg-hover: lighten($button-default-bg, 9%) !default;
  $button-default-contained-bg-focused: lighten($button-default-bg, 12%) !default;
  $button-default-contained-bg-active: lighten($button-default-bg, 23%) !default;
  $button-default-contained-bg-selected: lighten($button-default-bg, 17%) !default;
  $button-default-outlined-color: darken($button-default-bg, 5%) !default;
  $button-default-outlined-bg-hover: color.change($button-default-border-color, $alpha: 0.1) !default;
  $button-default-outlined-bg-focused: color.change($button-default-border-color, $alpha: 0.1) !default;
  $button-default-outlined-bg-active: color.change($button-default-border-color, $alpha: 0.4) !default;
  $button-default-outlined-bg-selected: color.change($button-default-bg, $alpha: 0.3) !default;
  $button-default-text-color: darken($button-default-bg, 5%) !default;
  $button-default-text-bg-hover: $button-default-outlined-bg-hover !default;
  $button-default-text-bg-focused: $button-default-outlined-bg-focused !default;
  $button-default-text-bg-active: $button-default-outlined-bg-active !default;
  $button-default-text-bg-selected: color.change($button-default-bg, $alpha: 0.3) !default;
  $button-danger-border-color: darken($button-danger-bg, 5%) !default;
  $button-danger-contained-bg-hover: lighten($button-danger-bg, 9%) !default;
  $button-danger-contained-bg-focused: lighten($button-danger-bg, 12%) !default;
  $button-danger-contained-bg-active: lighten($button-danger-bg, 23%) !default;
  $button-danger-contained-bg-selected: lighten($button-danger-bg, 17%) !default;
  $button-danger-outlined-bg-hover: color.change($button-danger-border-color, $alpha: 0.1) !default;
  $button-danger-outlined-bg-focused: color.change($button-danger-border-color, $alpha: 0.1) !default;
  $button-danger-outlined-bg-active: color.change($button-danger-border-color, $alpha: 0.4) !default;
  $button-danger-outlined-bg-selected: color.change($button-danger-bg, $alpha: 0.3) !default;
  $button-danger-text-bg-hover: $button-danger-outlined-bg-hover !default;
  $button-danger-text-bg-focused: $button-danger-outlined-bg-focused !default;
  $button-danger-text-bg-active: $button-danger-outlined-bg-active !default;
  $button-danger-text-bg-selected: color.change($button-danger-bg, $alpha: 0.3) !default;
  $button-success-border-color: darken($button-success-bg, 5%) !default;
  $button-success-contained-bg-hover: lighten($button-success-bg, 9%) !default;
  $button-success-contained-bg-focused: lighten($button-success-bg, 12%) !default;
  $button-success-contained-bg-active: lighten($button-success-bg, 23%) !default;
  $button-success-contained-bg-selected: lighten($button-success-bg, 17%) !default;
  $button-success-outlined-bg-hover: color.change($button-success-border-color, $alpha: 0.1) !default;
  $button-success-outlined-bg-focused: color.change($button-success-border-color, $alpha: 0.1) !default;
  $button-success-outlined-bg-active: color.change($button-success-border-color, $alpha: 0.4) !default;
  $button-success-outlined-bg-selected: color.change($button-success-bg, $alpha: 0.3) !default;
  $button-success-text-bg-hover: $button-success-outlined-bg-hover !default;
  $button-success-text-bg-focused: $button-success-outlined-bg-focused !default;
  $button-success-text-bg-active: $button-success-outlined-bg-active !default;
  $button-success-text-bg-selected: color.change($button-success-bg, $alpha: 0.3) !default;
}

@if $color == "darkviolet" {
  $button-normal-bg: #303038 !default;
  $button-normal-border-color: $base-hover-bg !default;
  $button-normal-bg-inverted: lighten($button-normal-bg, 100%) !default;
  $button-normal-contained-bg-hover: lighten($button-normal-bg, 4%) !default;
  $button-normal-contained-bg-focused: lighten($button-normal-bg, 8%) !default;
  $button-normal-contained-bg-active: lighten($button-normal-bg, 24%) !default;
  $button-normal-contained-bg-selected: lighten($button-normal-bg, 17%) !default;
  $button-normal-outlined-bg: color.change($button-normal-bg-inverted, $alpha: 0) !default;
  $button-normal-outlined-bg-hover: color.change($button-normal-outlined-bg, $alpha: 0.04) !default;
  $button-normal-outlined-bg-focused: color.change($button-normal-outlined-bg, $alpha: 0.08) !default;
  $button-normal-outlined-bg-active: color.change($button-normal-outlined-bg, $alpha: 0.24) !default;
  $button-normal-outlined-bg-selected: color.change($button-normal-outlined-bg, $alpha: 0.17) !default;
  $button-normal-text-bg: color.change($button-normal-bg-inverted, $alpha: 0) !default;
  $button-normal-text-bg-hover: color.change($button-normal-text-bg, $alpha: 0.04) !default;
  $button-normal-text-bg-focused: color.change($button-normal-text-bg, $alpha: 0.08) !default;
  $button-normal-text-bg-active: color.change($button-normal-text-bg, $alpha: 0.24) !default;
  $button-normal-text-bg-selected: color.change($button-normal-text-bg, $alpha: 0.17) !default;
  $button-default-bg: $base-accent !default;
  $button-default-border-color: darken($button-default-bg, 5%) !default;
  $button-default-contained-bg-hover: lighten($button-default-bg, 9%) !default;
  $button-default-contained-bg-focused: lighten($button-default-bg, 12%) !default;
  $button-default-contained-bg-active: lighten($button-default-bg, 23%) !default;
  $button-default-contained-bg-selected: lighten($button-default-bg, 17%) !default;
  $button-default-outlined-color: darken($button-default-bg, 5%) !default;
  $button-default-outlined-bg-hover: color.change($button-default-border-color, $alpha: 0.1) !default;
  $button-default-outlined-bg-focused: color.change($button-default-border-color, $alpha: 0.1) !default;
  $button-default-outlined-bg-active: color.change($button-default-border-color, $alpha: 0.4) !default;
  $button-default-outlined-bg-selected: color.change($button-default-bg, $alpha: 0.3) !default;
  $button-default-text-color: darken($button-default-bg, 5%) !default;
  $button-default-text-bg-hover: $button-default-outlined-bg-hover !default;
  $button-default-text-bg-focused: $button-default-outlined-bg-focused !default;
  $button-default-text-bg-active: $button-default-outlined-bg-active !default;
  $button-default-text-bg-selected: color.change($button-default-bg, $alpha: 0.3) !default;
  $button-danger-border-color: darken($button-danger-bg, 5%) !default;
  $button-danger-contained-bg-hover: lighten($button-danger-bg, 9%) !default;
  $button-danger-contained-bg-focused: lighten($button-danger-bg, 12%) !default;
  $button-danger-contained-bg-active: lighten($button-danger-bg, 23%) !default;
  $button-danger-contained-bg-selected: lighten($button-danger-bg, 17%) !default;
  $button-danger-outlined-bg-hover: color.change($button-danger-border-color, $alpha: 0.1) !default;
  $button-danger-outlined-bg-focused: color.change($button-danger-border-color, $alpha: 0.1) !default;
  $button-danger-outlined-bg-active: color.change($button-danger-border-color, $alpha: 0.4) !default;
  $button-danger-outlined-bg-selected: color.change($button-danger-bg, $alpha: 0.3) !default;
  $button-danger-text-bg-hover: $button-danger-outlined-bg-hover !default;
  $button-danger-text-bg-focused: $button-danger-outlined-bg-focused !default;
  $button-danger-text-bg-active: $button-danger-outlined-bg-active !default;
  $button-danger-text-bg-selected: color.change($button-danger-bg, $alpha: 0.3) !default;
  $button-success-border-color: darken($button-success-bg, 5%) !default;
  $button-success-contained-bg-hover: lighten($button-success-bg, 9%) !default;
  $button-success-contained-bg-focused: lighten($button-success-bg, 12%) !default;
  $button-success-contained-bg-active: lighten($button-success-bg, 23%) !default;
  $button-success-contained-bg-selected: lighten($button-success-bg, 17%) !default;
  $button-success-outlined-bg-hover: color.change($button-success-border-color, $alpha: 0.1) !default;
  $button-success-outlined-bg-focused: color.change($button-success-border-color, $alpha: 0.1) !default;
  $button-success-outlined-bg-active: color.change($button-success-border-color, $alpha: 0.4) !default;
  $button-success-outlined-bg-selected: color.change($button-success-bg, $alpha: 0.3) !default;
  $button-success-text-bg-hover: $button-success-outlined-bg-hover !default;
  $button-success-text-bg-focused: $button-success-outlined-bg-focused !default;
  $button-success-text-bg-active: $button-success-outlined-bg-active !default;
  $button-success-text-bg-selected: color.change($button-success-bg, $alpha: 0.3) !default;
}

@if $color == "greenmist" {
  $button-normal-bg: $base-element-bg !default;
  $button-normal-border-color: lighten($base-label-color, 16.5%) !default;
  $button-normal-bg-inverted: darken($button-normal-bg, 100%) !default;
  $button-normal-contained-bg-hover: darken($button-normal-bg, 4%) !default;
  $button-normal-contained-bg-focused: darken($button-normal-bg, 8%) !default;
  $button-normal-contained-bg-active: darken($button-normal-bg, 24%) !default;
  $button-normal-contained-bg-selected: darken($button-normal-bg, 17%) !default;
  $button-normal-outlined-bg: color.change($button-normal-bg-inverted, $alpha: 0) !default;
  $button-normal-outlined-bg-hover: color.change($button-normal-outlined-bg, $alpha: 0.04) !default;
  $button-normal-outlined-bg-focused: color.change($button-normal-outlined-bg, $alpha: 0.08) !default;
  $button-normal-outlined-bg-active: color.change($button-normal-outlined-bg, $alpha: 0.24) !default;
  $button-normal-outlined-bg-selected: color.change($button-normal-outlined-bg, $alpha: 0.17) !default;
  $button-normal-text-bg: color.change($button-normal-bg-inverted, $alpha: 0) !default;
  $button-normal-text-bg-hover: color.change($button-normal-text-bg, $alpha: 0.04) !default;
  $button-normal-text-bg-focused: color.change($button-normal-text-bg, $alpha: 0.08) !default;
  $button-normal-text-bg-active: color.change($button-normal-text-bg, $alpha: 0.24) !default;
  $button-normal-text-bg-selected: color.change($button-normal-text-bg, $alpha: 0.17) !default;
  $button-default-bg: $base-accent !default;
  $button-default-border-color: darken($button-default-bg, 5%) !default;
  $button-default-contained-bg-hover: darken($button-default-bg, 9%) !default;
  $button-default-contained-bg-focused: darken($button-default-bg, 12%) !default;
  $button-default-contained-bg-active: darken($button-default-bg, 23%) !default;
  $button-default-contained-bg-selected: darken($button-default-bg, 17%) !default;
  $button-default-outlined-color: darken($button-default-bg, 5%) !default;
  $button-default-outlined-bg-hover: color.change($button-default-border-color, $alpha: 0.1) !default;
  $button-default-outlined-bg-focused: color.change($button-default-border-color, $alpha: 0.1) !default;
  $button-default-outlined-bg-active: color.change($button-default-border-color, $alpha: 0.4) !default;
  $button-default-outlined-bg-selected: color.change($button-default-bg, $alpha: 0.3) !default;
  $button-default-text-color: darken($button-default-bg, 5%) !default;
  $button-default-text-bg-hover: $button-default-outlined-bg-hover !default;
  $button-default-text-bg-focused: $button-default-outlined-bg-focused !default;
  $button-default-text-bg-active: $button-default-outlined-bg-active !default;
  $button-default-text-bg-selected: color.change($button-default-bg, $alpha: 0.3) !default;
  $button-danger-border-color: darken($button-danger-bg, 5%) !default;
  $button-danger-contained-bg-hover: darken($button-danger-bg, 9%) !default;
  $button-danger-contained-bg-focused: darken($button-danger-bg, 12%) !default;
  $button-danger-contained-bg-active: darken($button-danger-bg, 23%) !default;
  $button-danger-contained-bg-selected: darken($button-danger-bg, 17%) !default;
  $button-danger-outlined-bg-hover: color.change($button-danger-border-color, $alpha: 0.1) !default;
  $button-danger-outlined-bg-focused: color.change($button-danger-border-color, $alpha: 0.1) !default;
  $button-danger-outlined-bg-active: color.change($button-danger-border-color, $alpha: 0.4) !default;
  $button-danger-outlined-bg-selected: color.change($button-danger-bg, $alpha: 0.3) !default;
  $button-danger-text-bg-hover: $button-danger-outlined-bg-hover !default;
  $button-danger-text-bg-focused: $button-danger-outlined-bg-focused !default;
  $button-danger-text-bg-active: $button-danger-outlined-bg-active !default;
  $button-danger-text-bg-selected: color.change($button-danger-bg, $alpha: 0.3) !default;
  $button-success-border-color: darken($button-success-bg, 5%) !default;
  $button-success-contained-bg-hover: darken($button-success-bg, 9%) !default;
  $button-success-contained-bg-focused: darken($button-success-bg, 12%) !default;
  $button-success-contained-bg-active: darken($button-success-bg, 23%) !default;
  $button-success-contained-bg-selected: darken($button-success-bg, 17%) !default;
  $button-success-outlined-bg-hover: color.change($button-success-border-color, $alpha: 0.1) !default;
  $button-success-outlined-bg-focused: color.change($button-success-border-color, $alpha: 0.1) !default;
  $button-success-outlined-bg-active: color.change($button-success-border-color, $alpha: 0.4) !default;
  $button-success-outlined-bg-selected: color.change($button-success-bg, $alpha: 0.3) !default;
  $button-success-text-bg-hover: $button-success-outlined-bg-hover !default;
  $button-success-text-bg-focused: $button-success-outlined-bg-focused !default;
  $button-success-text-bg-active: $button-success-outlined-bg-active !default;
  $button-success-text-bg-selected: color.change($button-success-bg, $alpha: 0.3) !default;
}

@if $color == "light" {
  $button-normal-bg: $base-element-bg !default;
  $button-normal-border-color: $base-border-color !default;
  $button-normal-bg-inverted: darken($button-normal-bg, 100%) !default;
  $button-normal-contained-bg-hover: darken($button-normal-bg, 4%) !default;
  $button-normal-contained-bg-focused: darken($button-normal-bg, 8%) !default;
  $button-normal-contained-bg-active: darken($button-normal-bg, 24%) !default;
  $button-normal-contained-bg-selected: darken($button-normal-bg, 17%) !default;
  $button-normal-outlined-bg: color.change($button-normal-bg-inverted, $alpha: 0) !default;
  $button-normal-outlined-bg-hover: color.change($button-normal-outlined-bg, $alpha: 0.04) !default;
  $button-normal-outlined-bg-focused: color.change($button-normal-outlined-bg, $alpha: 0.08) !default;
  $button-normal-outlined-bg-active: color.change($button-normal-outlined-bg, $alpha: 0.24) !default;
  $button-normal-outlined-bg-selected: color.change($button-normal-outlined-bg, $alpha: 0.17) !default;
  $button-normal-text-bg: color.change($button-normal-bg-inverted, $alpha: 0) !default;
  $button-normal-text-bg-hover: color.change($button-normal-text-bg, $alpha: 0.04) !default;
  $button-normal-text-bg-focused: color.change($button-normal-text-bg, $alpha: 0.08) !default;
  $button-normal-text-bg-active: color.change($button-normal-text-bg, $alpha: 0.24) !default;
  $button-normal-text-bg-selected: color.change($button-normal-text-bg, $alpha: 0.17) !default;
  $button-default-bg: $base-accent !default;
  $button-default-border-color: darken($button-default-bg, 5%) !default;
  $button-default-contained-bg-hover: darken($button-default-bg, 9%) !default;
  $button-default-contained-bg-focused: darken($button-default-bg, 12%) !default;
  $button-default-contained-bg-active: darken($button-default-bg, 23%) !default;
  $button-default-contained-bg-selected: darken($button-default-bg, 17%) !default;
  $button-default-outlined-color: darken($button-default-bg, 5%) !default;
  $button-default-outlined-bg-hover: color.change($button-default-border-color, $alpha: 0.1) !default;
  $button-default-outlined-bg-focused: color.change($button-default-border-color, $alpha: 0.1) !default;
  $button-default-outlined-bg-active: color.change($button-default-border-color, $alpha: 0.4) !default;
  $button-default-outlined-bg-selected: color.change($button-default-bg, $alpha: 0.3) !default;
  $button-default-text-color: darken($button-default-bg, 5%) !default;
  $button-default-text-bg-hover: $button-default-outlined-bg-hover !default;
  $button-default-text-bg-focused: $button-default-outlined-bg-focused !default;
  $button-default-text-bg-active: $button-default-outlined-bg-active !default;
  $button-default-text-bg-selected: color.change($button-default-bg, $alpha: 0.3) !default;
  $button-danger-border-color: darken($button-danger-bg, 5%) !default;
  $button-danger-contained-bg-hover: darken($button-danger-bg, 9%) !default;
  $button-danger-contained-bg-focused: darken($button-danger-bg, 12%) !default;
  $button-danger-contained-bg-active: darken($button-danger-bg, 23%) !default;
  $button-danger-contained-bg-selected: darken($button-danger-bg, 17%) !default;
  $button-danger-outlined-bg-hover: color.change($button-danger-border-color, $alpha: 0.1) !default;
  $button-danger-outlined-bg-focused: color.change($button-danger-border-color, $alpha: 0.1) !default;
  $button-danger-outlined-bg-active: color.change($button-danger-border-color, $alpha: 0.4) !default;
  $button-danger-outlined-bg-selected: color.change($button-danger-bg, $alpha: 0.3) !default;
  $button-danger-text-bg-hover: $button-danger-outlined-bg-hover !default;
  $button-danger-text-bg-focused: $button-danger-outlined-bg-focused !default;
  $button-danger-text-bg-active: $button-danger-outlined-bg-active !default;
  $button-danger-text-bg-selected: color.change($button-danger-bg, $alpha: 0.3) !default;
  $button-success-border-color: darken($button-success-bg, 5%) !default;
  $button-success-contained-bg-hover: darken($button-success-bg, 9%) !default;
  $button-success-contained-bg-focused: darken($button-success-bg, 12%) !default;
  $button-success-contained-bg-active: darken($button-success-bg, 23%) !default;
  $button-success-contained-bg-selected: darken($button-success-bg, 17%) !default;
  $button-success-outlined-bg-hover: color.change($button-success-border-color, $alpha: 0.1) !default;
  $button-success-outlined-bg-focused: color.change($button-success-border-color, $alpha: 0.1) !default;
  $button-success-outlined-bg-active: color.change($button-success-border-color, $alpha: 0.4) !default;
  $button-success-outlined-bg-selected: color.change($button-success-bg, $alpha: 0.3) !default;
  $button-success-text-bg-hover: $button-success-outlined-bg-hover !default;
  $button-success-text-bg-focused: $button-success-outlined-bg-focused !default;
  $button-success-text-bg-active: $button-success-outlined-bg-active !default;
  $button-success-text-bg-selected: color.change($button-success-bg, $alpha: 0.3) !default;
}

@if $color == "softblue" {
  $button-normal-bg: $base-element-bg !default;
  $button-normal-border-color: darken($base-border-color, 11%) !default;
  $button-normal-bg-inverted: darken($button-normal-bg, 100%) !default;
  $button-normal-contained-bg-hover: darken($button-normal-bg, 4%) !default;
  $button-normal-contained-bg-focused: darken($button-normal-bg, 8%) !default;
  $button-normal-contained-bg-active: darken($button-normal-bg, 24%) !default;
  $button-normal-contained-bg-selected: darken($button-normal-bg, 17%) !default;
  $button-normal-outlined-bg: color.change($button-normal-bg-inverted, $alpha: 0) !default;
  $button-normal-outlined-bg-hover: color.change($button-normal-outlined-bg, $alpha: 0.04) !default;
  $button-normal-outlined-bg-focused: color.change($button-normal-outlined-bg, $alpha: 0.08) !default;
  $button-normal-outlined-bg-active: color.change($button-normal-outlined-bg, $alpha: 0.24) !default;
  $button-normal-outlined-bg-selected: color.change($button-normal-outlined-bg, $alpha: 0.17) !default;
  $button-normal-text-bg: color.change($button-normal-bg-inverted, $alpha: 0) !default;
  $button-normal-text-bg-hover: color.change($button-normal-text-bg, $alpha: 0.04) !default;
  $button-normal-text-bg-focused: color.change($button-normal-text-bg, $alpha: 0.08) !default;
  $button-normal-text-bg-active: color.change($button-normal-text-bg, $alpha: 0.24) !default;
  $button-normal-text-bg-selected: color.change($button-normal-text-bg, $alpha: 0.17) !default;
  $button-default-bg: $base-accent !default;
  $button-default-border-color: darken($button-default-bg, 5%) !default;
  $button-default-contained-bg-hover: darken($button-default-bg, 9%) !default;
  $button-default-contained-bg-focused: darken($button-default-bg, 12%) !default;
  $button-default-contained-bg-active: darken($button-default-bg, 23%) !default;
  $button-default-contained-bg-selected: darken($button-default-bg, 17%) !default;
  $button-default-outlined-color: darken($button-default-bg, 5%) !default;
  $button-default-outlined-bg-hover: color.change($button-default-border-color, $alpha: 0.1) !default;
  $button-default-outlined-bg-focused: color.change($button-default-border-color, $alpha: 0.1) !default;
  $button-default-outlined-bg-active: color.change($button-default-border-color, $alpha: 0.4) !default;
  $button-default-outlined-bg-selected: color.change($button-default-bg, $alpha: 0.3) !default;
  $button-default-text-color: darken($button-default-bg, 5%) !default;
  $button-default-text-bg-hover: $button-default-outlined-bg-hover !default;
  $button-default-text-bg-focused: $button-default-outlined-bg-focused !default;
  $button-default-text-bg-active: $button-default-outlined-bg-active !default;
  $button-default-text-bg-selected: color.change($button-default-bg, $alpha: 0.3) !default;
  $button-danger-border-color: darken($button-danger-bg, 5%) !default;
  $button-danger-contained-bg-hover: darken($button-danger-bg, 9%) !default;
  $button-danger-contained-bg-focused: darken($button-danger-bg, 12%) !default;
  $button-danger-contained-bg-active: darken($button-danger-bg, 23%) !default;
  $button-danger-contained-bg-selected: darken($button-danger-bg, 17%) !default;
  $button-danger-outlined-bg-hover: color.change($button-danger-border-color, $alpha: 0.1) !default;
  $button-danger-outlined-bg-focused: color.change($button-danger-border-color, $alpha: 0.1) !default;
  $button-danger-outlined-bg-active: color.change($button-danger-border-color, $alpha: 0.4) !default;
  $button-danger-outlined-bg-selected: color.change($button-danger-bg, $alpha: 0.3) !default;
  $button-danger-text-bg-hover: $button-danger-outlined-bg-hover !default;
  $button-danger-text-bg-focused: $button-danger-outlined-bg-focused !default;
  $button-danger-text-bg-active: $button-danger-outlined-bg-active !default;
  $button-danger-text-bg-selected: color.change($button-danger-bg, $alpha: 0.3) !default;
  $button-success-border-color: darken($button-success-bg, 5%) !default;
  $button-success-contained-bg-hover: darken($button-success-bg, 9%) !default;
  $button-success-contained-bg-focused: darken($button-success-bg, 12%) !default;
  $button-success-contained-bg-active: darken($button-success-bg, 23%) !default;
  $button-success-contained-bg-selected: darken($button-success-bg, 17%) !default;
  $button-success-outlined-bg-hover: color.change($button-success-border-color, $alpha: 0.1) !default;
  $button-success-outlined-bg-focused: color.change($button-success-border-color, $alpha: 0.1) !default;
  $button-success-outlined-bg-active: color.change($button-success-border-color, $alpha: 0.4) !default;
  $button-success-outlined-bg-selected: color.change($button-success-bg, $alpha: 0.3) !default;
  $button-success-text-bg-hover: $button-success-outlined-bg-hover !default;
  $button-success-text-bg-focused: $button-success-outlined-bg-focused !default;
  $button-success-text-bg-active: $button-success-outlined-bg-active !default;
  $button-success-text-bg-selected: color.change($button-success-bg, $alpha: 0.3) !default;
}

$never-used: collector((
"$button-normal-color": $button-normal-color,
"$button-normal-bg": $button-normal-bg,
"$button-normal-outlined-bg": $button-normal-outlined-bg,
"$button-normal-text-bg": $button-normal-text-bg,
"$button-normal-border-color": $button-normal-border-color,
"$button-normal-contained-bg-selected": $button-normal-contained-bg-selected,
"$button-normal-outlined-bg-selected": $button-normal-outlined-bg-selected,
"$button-normal-text-bg-selected": $button-normal-text-bg-selected,
"$button-default-color": $button-default-color,
"$button-default-bg": $button-default-bg,
"$button-default-border-color": $button-default-border-color,
"$button-default-contained-bg-selected": $button-default-contained-bg-selected,
"$button-default-outlined-color": $button-default-outlined-color,
"$button-default-outlined-bg-selected": $button-default-outlined-bg-selected,
"$button-default-text-color": $button-default-text-color,
"$button-default-text-bg-selected": $button-default-text-bg-selected,
"$button-danger-color": $button-danger-color,
"$button-danger-bg": $button-danger-bg,
"$button-danger-border-color": $button-danger-border-color,
"$button-danger-contained-bg-selected": $button-danger-contained-bg-selected,
"$button-danger-outlined-bg-selected": $button-danger-outlined-bg-selected,
"$button-danger-text-bg-selected": $button-danger-text-bg-selected,
"$button-success-color": $button-success-color,
"$button-success-bg": $button-success-bg,
"$button-success-border-color": $button-success-border-color,
"$button-success-contained-bg-selected": $button-success-contained-bg-selected,
"$button-success-outlined-bg-selected": $button-success-outlined-bg-selected,
"$button-success-text-bg-selected": $button-success-text-bg-selected,
));
