@import '../default/var';
// @import './icon';
.#{$prefix} {
    &-switch {
        display: inline-block;
        width: 48px;
        height: 22px;
        background-color: $switch-color-back;
        border-radius: 22px;
        position: relative;
        font-size: $switch-font-size;
        user-select: none;
        &:not(:is-disabled) {
            cursor: pointer;
        }
        &.is-loading {
            cursor: not-allowed;
        }
        &--closed {
            background-color: $switch-color-closed-back;
            &.is-disabled,
            &.is-loading {
                background-color: $switch-color-disabled-closed-back;
            }
            .#{$prefix}-switch__dot {
                left: 0px;
            }
        }
        &--opened {
            &.is-disabled,
            &.is-loading {
                background-color: $switch-color-disabled-opened-back;
            }
            .#{$prefix}-switch__dot {
                left: 26px;
            }
        }
        &__dot {
            width: 18px;
            height: 18px;
            background: $switch-color-dot;
            border-radius: 50%;
            margin: 2px;
            position: absolute;
            transition: left 0.3s;
            .#{$prefix}-icon-loading {
                font-size: 13px;
                margin: 2.5px auto auto 3px;
                color: #ccc;
            }
        }
        &__font {
            position: absolute;
            color: $switch-color-fore;
            padding: 0 6px;
            width: 100%;
            box-sizing: border-box;
            &--open,
            &--close {
                width: 18px;
                height: 22px;
                line-height: 22px;
                text-align: center;
                display: inline-block;
            }
        }
    }
}