@use '../utils/constants.scss';

$inputChoiceCursor: '--#{constants.$prefix}input-choice-cursor';
$inputChoiceLabelCursor: '--#{constants.$prefix}input-choice-label-cursor';
$inputChoiceLabelPointerEvents: '--#{constants.$prefix}input-choice-label-pointer-events';

$textLabelCursor: '--#{constants.$prefix}label-cursor';
$textLabelPointerEvents: '--#{constants.$prefix}label-pointer-events';
$textFieldCursor: '--#{constants.$prefix}text-field-cursor';
$textFieldInputCursor: '--#{constants.$prefix}text-field-input-cursor';

@mixin applyChoiceCursors () {
  &--read-only {
    #{$inputChoiceCursor}: default;
    #{$inputChoiceLabelCursor}: default;
    #{$inputChoiceLabelPointerEvents}: none;
  }

  &--disabled {
    #{$inputChoiceCursor}: not-allowed;
    #{$inputChoiceLabelCursor}: not-allowed;
  }
}

@mixin applyTextCursors () {
  #{$textLabelCursor}: pointer;

  &--disabled {
    #{$textLabelCursor}: not-allowed;
    #{$textLabelPointerEvents}: auto;

    #{$textFieldCursor}: not-allowed;
    #{$textFieldInputCursor}: not-allowed;
  }
}
