@use 'styles/helpers.scss' as *;

$scope: 'switch';

$themes: (
  'light': (
    'primary-background': color('light', 'base-text-disabled'),
    'primary-border-hover': rgb(color('light', 'primary-fill-1'), 0.2),
    'primary-border-hover-checked': rgb(color('light', 'primary-fill-1'), 0.3),
    'primary-border-focus': rgb(color('light', 'primary-fill-1'), 0.3),
    'primary-background-disabled': rgb(color('light', 'primary-fill-4'), 0.5),
    'primary-background-disabled-checked': color('light', 'primary-fill-5'),
    'primary-background-checked': color('light', 'primary-fill-4'),
    'thumb-background': color('dark', 'base-white'),
    'thumb-background-disabled': rgb(color('light', 'base-white'), 0.5),
    'thumb-background-checked': color('light', 'base-white'),
    'thumb-background-disabled-checked': rgb(color('light', 'base-white'), 0.5),
    'thumb-border': rgb(color('light', 'primary-fill-1'), 0.1),
    'thumb-border-checked': rgb(color('light', 'primary-fill-1'), 0.1),
    'thumb-border-checked-hover': rgb(color('light', 'primary-fill-1'), 0.3),
    'thumb-border-disabled-checked': rgb(color('light', 'base-black'), 0.1),
    'thumb-border-hover': rgb(color('light', 'primary-fill-1'), 0.2),
    'thumb-border-disabled': rgb(color('light', 'base-black'), 0.05),
    'label-color': color('light', 'base-black'),
  ),
  'dark': (
    'primary-background': color('dark', 'base-text-disabled'),
    'primary-border-hover': color('dark', 'base-grey'),
    'primary-border-hover-checked': color('dark', 'accent-primary-fill-3'),
    'primary-border-focus': rgb(color('dark', 'primary-fill-1'), 0.3),
    'primary-background-disabled': rgb(color('dark', 'base-grey'), 0.5),
    'primary-background-disabled-checked': rgb(color('dark', 'accent-primary-fill-2'), 0.5),
    'primary-background-checked': color('dark', 'accent-primary-fill-1'),
    'thumb-background': color('dark', 'base-white'),
    'thumb-background-disabled': rgb(color('dark', 'base-white'), 0.5),
    'thumb-background-checked': color('dark', 'base-white'),
    'thumb-background-disabled-checked': rgb(color('dark', 'base-white'), 0.5),
    'thumb-border': rgb(color('dark', 'base-grey'), 0.5),
    'thumb-border-checked': color('dark', 'accent-primary-fill-2'),
    'thumb-border-checked-hover': color('dark', 'accent-primary-fill-2'),
    'thumb-border-disabled-checked': rgb(color('dark', 'base-black'), 0.1),
    'thumb-border-hover': color('dark', 'base-grey'),
    'thumb-border-disabled': rgb(color('dark', 'base-grey'), 0.5),
    'label-color': color('dark', 'base-white'),
  ),
);

@mixin switch-theme-modifiers() {
  @include theme-modifiers($scope, $themes);
}

@function switch-theme-color($name) {
  @return theme-color($scope, $name);
}
