@Override
  public @Nullable Presentation getPresentation(@NotNull ActionContext context) {
    if (!BaseIntentionAction.canModify(context.file())) return null;
    PsiElement element = context.findLeaf();
    if (element == null) return null;
    PsiSwitchLabelStatementBase labelStatement = findLabelStatement(context, element);
    if (labelStatement == null || labelStatement.getEnclosingSwitchBlock() == null) return null;
    if (labelStatement instanceof PsiSwitchLabelStatement) {
      if (isMultiValueCase(labelStatement)) {
        // mixed syntax "case 1, 2: some code"
        if (isAvailableForLabel(labelStatement)) {
          return Presentation.of(JavaBundle.message("intention.split.switch.branch.with.several.case.values.split.text"));
        }
      }
      else if (hasSiblingLabel(labelStatement)) {
        // traditional syntax "case 1: case 2: some code"
        PsiSwitchLabelStatement lastSiblingLabel = findLastSiblingLabel(labelStatement, false);
        if (isAvailableForLabel(lastSiblingLabel)) {
          return Presentation.of(JavaBundle.message("intention.split.switch.branch.with.several.case.values.copy.text"));
        }
      }
    }
    else if (labelStatement instanceof PsiSwitchLabeledRuleStatement ruleStatement) {
      // enhanced syntax "case 1, 2 -> some code"
      if (isMultiValueCase(labelStatement)) {
        PsiStatement body = ruleStatement.getBody();
        if (body != null && element.getTextOffset() < body.getTextOffset()) {
          return Presentation.of(JavaBundle.message("intention.split.switch.branch.with.several.case.values.split.text"));
        }
      }
    }
    return null;
  }
@Override
  public @Nullable Presentation getPresentation(@NotNull ActionContext context)