/*
 * SPDX-FileCopyrightText: 2024 Siemens AG
 *
 * SPDX-License-Identifier: MIT
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

@mixin hover() {
  &:not(.disabled):not(:disabled) {
    cursor: pointer;

    &:hover,
    &.hover {
      @content;
    }
  }
}

@mixin active() {
  &:not(.disabled):not(:disabled) {
    cursor: pointer;

    &:active,
    &.active {
      @content;
    }
  }
}

@mixin focus() {
  &:not(.disabled):not(:disabled) {
    &:focus-visible {
      @content;
    }
  }
}

@mixin focus-visible() {
  &:not(.disabled):not(:disabled) {
    &:focus-visible {
      @content;
    }
  }
}

@mixin host-hover() {
  :host(:not(.disabled):not(:disabled)) {
    cursor: pointer;
  }

  :host(:hover:not(.disabled):not(:disabled)) {
    @content;
  }
}

@mixin host-active() {
  :host(:not(.disabled):not(:disabled)) {
    cursor: pointer;
  }

  :host(:active:not(.disabled):not(:disabled)) {
    @content;
  }
}

@mixin host-focus() {
  :host(:focus:not(.disabled):not(:disabled)) {
    @content;
  }
}

@mixin host-focus-visible() {
  :host(:focus-visible:not(.disabled):not(:disabled)) {
    @content;
  }
}

@mixin ghost-hover-pressed {
  &:not(.disabled):not(:disabled) {
    &.hover,
    &:hover {
      background-color: var(--theme-ghost--background--hover);
    }

    &.active,
    &:active {
      background-color: var(--theme-ghost--background--active);
    }
  }
}

@mixin visited() {
  &:not(.disabled):not(:disabled) {
    &:visited {
      @content;
    }
  }
}
