/** 透明主题 */
@use 'sass:map';
@use '../util.scss' as *;
$bg-transparent: transparent !default;
$backdrop-filter: blur(18px) !default;

$ele-transparent: () !default;
$ele-transparent: map.deep-merge(
  (
    'skin-bg': (
      'wallpaper': $bg-transparent,
      'header': hsla(0, 0%, 60%, 0.2),
      'sidebar': hsla(0, 0%, 60%, 0.2),
      'card': hsla(0, 0%, 60%, 0.2),
      'overlay': hsla(0, 0%, 60%, 0.4),
      'tooltip': hsla(0, 0%, 18%, 0.8)
    ),
    'layout': (
      'bg': $bg-transparent
    ),
    'header': (
      'bg': eleVar('skin-bg', 'header'),
      'shadow': (
        0 0 0 0.8px rgba(255, 255, 255, 0.8),
        0 2px 4px 0 rgba(0, 0, 0, 0.06)
      ),
      'divider-shadow': 0 -0.8px 0 elVar('border-color', 'extra-light') inset
    ),
    'sidebar': (
      'bg': eleVar('skin-bg', 'sidebar'),
      'mobile-bg': elVar('bg-color', 'overlay'),
      'shadow': (
        -0.8px 0 0 0 rgba(255, 255, 255, 0.6),
        0.8px 0 0 0 rgba(255, 255, 255, 0.8),
        0 -0.8px 0 0 rgba(255, 255, 255, 0.8),
        0 0.8px 0 0 rgba(255, 255, 255, 0.8),
        2px 1px 2px 0 rgba(0, 0, 0, 0.04)
      ),
      'divider-shadow': (
        0.8px 0 0 0 elVar('border-color', 'extra-light'),
        -0.8px 0 0 0 rgba(255, 255, 255, 0.8),
        0 -0.8px 0 0 rgba(255, 255, 255, 0.8),
        0 0.8px 0 0 rgba(255, 255, 255, 0.8),
        -2px 1px 2px 0 rgba(0, 0, 0, 0.04)
      ),
      'thumb-color': hsla(0, 0%, 68%, 0.4),
      'thumb-hover-color': hsla(0, 0%, 68%, 0.68)
    ),
    'card': (
      'bg': eleVar('skin-bg', 'card'),
      'border': 1px solid #fff,
      'none-border': 1px solid #fff,
      'none-shadow': 0 2px 4px 0 rgba(0, 0, 0, 0.06)
    ),
    'modal': (
      'bg': elVar('bg-color', 'overlay')
    ),
    'drawer': (
      'bg': elVar('bg-color', 'overlay')
    ),
    'table': (
      'tr-bg': $bg-transparent,
      'fixed-backdrop-filter': $backdrop-filter
    ),
    'pro-table': (
      'full-bg': elVar('bg-color', 'overlay')
    ),
    'tool-column': (
      'input-bg': elVar('fill-color', 'extra-light')
    ),
    'table-select': (
      'tr-bg': $bg-transparent
    ),
    'bottom-bar': (
      'bg': eleVar('skin-bg', 'card')
    ),
    'scrollbar': (
      'color': hsla(0, 0%, 38%, 0.58),
      'hover-color': hsla(0, 0%, 38%, 0.8)
    ),
    'menu': (
      'bg': $bg-transparent,
      'colorful-dot-color': rgba(0, 0, 0, 0.15),
      'colorful-dot-hover-color': rgba(0, 0, 0, 0.28),
      'thumb-color': hsla(0, 0%, 68%, 0.4),
      'thumb-hover-color': hsla(0, 0%, 68%, 0.68),
      'tooltip-dark-bg': eleVar('skin-bg', 'tooltip')
    ),
    'segmented': (
      'bg': elVar('fill-color', 'light')
    ),
    'tab': (
      'bg': eleVar('skin-bg', 'card'),
      'indicator-dot-color': rgba(0, 0, 0, 0.15),
      'indicator-dot-hover-color': rgba(0, 0, 0, 0.28),
      'button-bg': eleVar('skin-bg', 'card'),
      'button-shadow': (
        0 0 0 0.8px #fff inset,
        0 2px 4px 0 rgba(0, 0, 0, 0.06)
      ),
      'button-active-shadow': (
        0 0 0 0.8px #fff inset,
        0 2px 4px 0 rgba(0, 0, 0, 0.06)
      )
    ),
    'step': (
      'bg': none,
      'backdrop-filter': blur(3px)
    ),
    'backtop': (
      'border': 1px solid #fff
    ),
    'chat': (
      'side-bg': elVar('fill-color', 'lighter'),
      'header-tools-bg': elVar('fill-color', 'lighter'),
      'bubble-avatar-bg': elVar('fill-color', 'extra-light'),
      'input-bg': elVar('fill-color', 'light'),
      'file-tool-hover-bg': elVar('bg-color', 'overlay'),
      'backbottom-hover-bg': elVar('bg-color', 'overlay')
    ),
    'message': (
      'bg': elVar('bg-color', 'overlay')
    ),
    'viewer': (
      'bg': radial-gradient(
          #{elVar('text-color', 'placeholder')} 8%,
          $bg-transparent 8%
        )
        center / 16px 16px repeat
    ),
    'pro-form-builder': (
      'group-label-bg': none,
      'group-label-backdrop-filter': $backdrop-filter
    ),
    'checkbox': (
      'bg': $bg-transparent
    ),
    'radio': (
      'bg': $bg-transparent
    ),
    'popper': (
      'bg': elVar('bg-color', 'overlay')
    ),
    'tooltip': (
      'bg': eleVar('skin-bg', 'tooltip')
    ),
    'textarea': (
      'count-bg': $bg-transparent,
      'count-backdrop-filter': $backdrop-filter
    )
  ),
  $ele-transparent
);

$ele-transparent-dark: () !default;
$ele-transparent-dark: map.deep-merge(
  (
    'header': (
      'shadow': (
        0 0 0 0.8px elVar('border-color', 'lighter'),
        0 2px 4px 0 rgba(0, 0, 0, 0.06)
      ),
      'divider-shadow': 0 -0.8px 0 elVar('border-color', 'lighter') inset
    ),
    'sidebar': (
      'shadow': (
        -0.8px 0 0 0 elVar('border-color', 'extra-light'),
        0.8px 0 0 0 elVar('border-color', 'lighter'),
        0 -0.8px 0 0 elVar('border-color', 'lighter'),
        0 0.8px 0 0 elVar('border-color', 'lighter'),
        2px 1px 2px 0 rgba(0, 0, 0, 0.04)
      ),
      'divider-shadow': (
        0.8px 0 0 0 elVar('border-color', 'extra-light'),
        -0.8px 0 0 0 elVar('border-color', 'lighter'),
        0 -0.8px 0 0 elVar('border-color', 'lighter'),
        0 0.8px 0 0 elVar('border-color', 'lighter'),
        -2px 1px 2px 0 rgba(0, 0, 0, 0.04)
      )
    ),
    'backtop': (
      'border': 1px solid elVar('border-color', 'lighter')
    ),
    'card': (
      'border': 1px solid elVar('border-color', 'extra-light'),
      'none-border': none,
      'none-shadow': 0 2px 4px 0 rgba(0, 0, 0, 0.06)
    ),
    'scrollbar': (
      'color': hsla(0, 0%, 68%, 0.4),
      'hover-color': hsla(0, 0%, 68%, 0.68)
    ),
    'menu': (
      'colorful-dot-color': rgba(255, 255, 255, 0.4),
      'colorful-dot-hover-color': rgba(255, 255, 255, 0.6)
    ),
    'tab': (
      'indicator-dot-color': rgba(255, 255, 255, 0.4),
      'indicator-dot-hover-color': rgba(255, 255, 255, 0.6),
      'button-shadow': (
        0 0 0 0.8px elVar('border-color', 'extra-light') inset,
        0 2px 4px 0 rgba(0, 0, 0, 0.06)
      ),
      'button-active-shadow': (
        0 0 0 0.8px elVar('border-color', 'lighter') inset,
        0 2px 4px 0 rgba(0, 0, 0, 0.06)
      )
    )
  ),
  $ele-transparent-dark
);
