code: @SuppressWarnings("unused")
    public static @Nullable String getResourceTypeFromTemplatePath(@NotNull String templatePath) {
      if (templatePath == null) {
        return null;
      }
      String resource = null;
      Matcher matcher = TEMPLATE_PATH_PATTERN.matcher(templatePath);
      if (matcher.matches()) {
        resource = matcher.group(2) + "/components"
            + StringUtils.defaultString(matcher.group(3)) + "/page/" + matcher.group(4);
      }
      return resource;
    }
docs: Gets the resource type for a given template path.
  <p>
  This is based on the assumption that:
  </p>
  <ul>
  <li>Given a template path is <code>/apps/{app_path}/templates/{optional_path}/{template_path}</code></li>
  <li>Then the resource path is at <code>{app_path}/components/{optional_path}/page/{template_path}</code></li>
  </ul>
  @param templatePath Template path
  @return Resource type path or null if template path did not match expectations