$switch-base-prefix: #{$prefix}-switch-base;
@mixin switch-base {
  display: inline-flex;
  align-items: center;
  margin-right: $switch-gutter-width;
  vertical-align: middle;
  cursor: pointer;

  &-disabled {
    color: $component-disabled-color;
  }
  &-input {
    position: absolute;
    top: 50%;
    left: 50%;
    width: $switch-trigger-size;
    height: $switch-trigger-size;
    outline: 0;
    opacity: 0;
    transform: translate(-50%, -50%);
    cursor: inherit;
    &:focus:not([disabled]) ~ * {
      color: $primary-color;
    }
    &:hover:not([disabled]) ~ * {
      color: $primary-color;
    }
  }
}

@mixin ne-switch-base {
  .#{$switch-base-prefix} {
    @include switch-base;
  }
  @each $name, $value in $sizes-map {
    .#{$switch-base-prefix}-#{$name} {
      min-height: $value;
      font-size: map_get($font-sizes-map, $name);
      line-height: ($global-line-height + 0.01px) / map-get($font-sizes-map, $name);
    }
  }
}
