// Copyright (c) 2016-2018 VMware, Inc. All Rights Reserved.
// This software is released under MIT license.
// The full license information can be found in LICENSE in the root directory of this project.

// TODO: Split badges and labels into separate files.

@mixin generateLabelStyles($color: gray, $alias: 1) {
    $label-color-map: map-get($clr-label-colors, $color);
    $badge-color-map: map-get($clr-badge-colors, $color);

    &.label-#{$color},
    &.label-#{$alias} {
        border: $clr-default-borderwidth solid map-get($label-color-map, background);
    }

    &.clickable.label-#{$color} {
        &:hover,
        &:active {
            text-decoration: none;
            background: $clr-label-bg-hover-color;
        }

        &:active {
            box-shadow: 0 $clr-default-borderwidth 0 0 map-get($label-color-map, background) inset;
            transform: translateY(0.5px);
        }
    }

    &.label-#{$color} > .badge {
        background: map-get($badge-color-map, background);
        color: map-get($badge-color-map, font);
    }
}

@mixin generateBadgeStyles($color: gray, $alias: 1) {
    $color-map: map-get($clr-badge-colors, $color);
    &.badge-#{$color},
    &.badge-#{$alias} {
        background: map-get($color-map, background);
        color: map-get($color-map, font);
    }
}

@mixin generateStatusLabelStyles($status: info) {
    $status-map: map-get($clr-label-status, $status);
    &.label-#{$status} {
        background: map-get($status-map, background);
        color: map-get($status-map, font);
        border: $clr-default-borderwidth solid map-get($status-map, border);
    }
}

@mixin generateStatusBadgeStyles($status: info) {
    $status-map: map-get($clr-badge-status, $status);
    &.badge-#{$status} {
        background: map-get($status-map, background);
        color: map-get($status-map, font);
    }
}
