static @Nullable PsiRecordComponent getRecordComponentForDeconstructionComponent(@NotNull PsiElement currentPosition) {
    PsiDeconstructionList deconstructionList = PsiTreeUtil.getParentOfType(currentPosition, PsiDeconstructionList.class);
    if (deconstructionList == null) return null;
    PsiDeconstructionPattern deconstructionPattern = ObjectUtils.tryCast(deconstructionList.getParent(), PsiDeconstructionPattern.class);
    if (deconstructionPattern == null) return null;
    PsiClass psiRecord = PsiUtil.resolveClassInClassTypeOnly(deconstructionPattern.getTypeElement().getType());
    if (psiRecord == null || !psiRecord.isRecord()) return null;
    @NotNull PsiPattern @NotNull [] components = deconstructionList.getDeconstructionComponents();
    int indexOfPattern = -1;
    for (int i = 0; i < components.length; i++) {
      PsiPattern component = components[i];
      if (PsiTreeUtil.isAncestor(component, currentPosition, false)) {
        indexOfPattern = i;
        break;
      }
    }
    if (indexOfPattern == -1) {
      indexOfPattern = components.length;
    }
    PsiRecordComponent[] recordComponents = psiRecord.getRecordComponents();
    if (recordComponents.length < indexOfPattern) return null;
    return recordComponents[indexOfPattern];
  }
static @Nullable PsiRecordComponent getRecordComponentForDeconstructionComponent(@NotNull PsiElement currentPosition)