/**
 * @license
 * Copyright Endlessjs. All Rights Reserved.
 * Licensed under the MIT License. See License.txt in the project root for license information.
 */

@mixin el-tooltip-status($status) {
  $background-color: el-theme(tooltip-#{$status}-background-color);
  $text-color: el-theme(tooltip-#{$status}-text-color);

  &.status-#{$status} {
    background: $background-color;
    .arrow {
      border-bottom-color: $background-color;
    }

    .content {
      color: $text-color;
    }
  }
}

@mixin el-tooltip-theme {
  el-tooltip {
    $arrow-size: 6px;
    box-shadow: el-theme(tooltip-shadow);

    background: el-theme(tooltip-background-color);
    border: el-theme(tooltip-border-width) el-theme(tooltip-border-style) el-theme(tooltip-border-color);
    border-radius: el-theme(tooltip-border-radius);
    padding: el-theme(tooltip-padding);
    max-width: el-theme(tooltip-max-width);

    .content {
      color: el-theme(tooltip-text-color);
      font-family: el-theme(tooltip-text-font-family);
      font-size: el-theme(tooltip-text-font-size);
      font-weight: el-theme(tooltip-text-font-weight);
      line-height: el-theme(tooltip-text-line-height);
    }

    .arrow {
      border-bottom: $arrow-size el-theme(tooltip-border-style) el-theme(tooltip-background-color);
    }

    @each $status in el-get-statuses() {
      @include el-tooltip-status($status);
    }
  }
}
