@import '../jnt-variables';
@import '../forms/switch';
@import '../jnt-hosts';

@mixin jnt-theme-switcher($passed: (), $context: null, $strategy: 'changes') {
  $defs: ();
  $vars: $passed;
  $declare: false;
  @if $passed == () or $strategy == 'merge' {
    $vars: recursive-map-merge($defs, $passed);
    $declare: true;
  }
  #{if($context, $context, $jnt-theme-switcher-host)} {
    @if $declare {
      display: inline-block;
    }
  }
  #{$context} [data-switch][child-of=jnt-theme-switcher-host] {
    @if $declare {
      @include jnt-switch((
        padding: 2px,
        background: (
          on: $jnt-primary-light-color,
          off: $jnt-primary-color,
          slider: (
            on: $jnt-primary-color,
            off: $jnt-primary-light-color
          ),
          icon: (
            on: $jnt-white-color,
            off: $jnt-white-color
          )
        ),
        sizes: (
          normal: (
            width: 65px,
            height: 28px
          )
        )
      ), '&');
    }
  }
}
@if $jnt-debug {
  @debug 'theme-switcher compiled';
}
