chromium/ui/webui/resources/cr_components/help_bubble/BUILD.gn

# Copyright 2022 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//mojo/public/tools/bindings/mojom.gni")
import("//ui/webui/resources/tools/build_webui.gni")

assert(!is_android && !is_ios)

mojom("mojo_bindings") {
  sources = [ "help_bubble.mojom" ]

  public_deps = [
    "//mojo/public/mojom/base",
    "//ui/gfx/geometry/mojom",
  ]

  webui_module_path = "chrome://resources/cr_components/help_bubble/"
}

build_webui("build") {
  grd_prefix = "cr_components_help_bubble"

  non_web_component_files = [
    "help_bubble.ts",
    "help_bubble.html.ts",
    "help_bubble_mixin.ts",
    "help_bubble_mixin_lit.ts",
    "help_bubble_proxy.ts",
    "help_bubble_controller.ts",
    "new_badge.ts",
    "new_badge.html.ts",
  ]

  css_files = [
    "help_bubble.css",
    "new_badge.css",
  ]

  icons_html_files = [ "help_bubble_icons.html" ]

  mojo_files_deps = [ ":mojo_bindings_ts__generator" ]
  mojo_files = [ "$target_gen_dir/help_bubble.mojom-webui.ts" ]

  html_to_wrapper_template = "detect"

  ts_tsconfig_base = "//tools/typescript/tsconfig_base_lit.json"
  ts_out_dir = "$root_gen_dir/ui/webui/resources/tsc/cr_components/help_bubble"
  ts_composite = true
  ts_deps = [
    "//third_party/lit/v3_0:build_ts",
    "//third_party/polymer/v3_0:library",
    "//ui/webui/resources/cr_elements:build_ts",
    "//ui/webui/resources/js:build_ts",
    "//ui/webui/resources/mojo:build_ts",
  ]
  webui_context_type = "relative"
  generate_grdp = true
  grd_resource_path_prefix = rebase_path(".", "//ui/webui/resources")
}