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

# Copyright 2024 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)

mojom("mojo_bindings") {
  sources = [ "history_embeddings.mojom" ]
  webui_module_path = ""
  public_deps = [
    "//mojo/public/mojom/base",
    "//url/mojom:url_mojom_gurl",
  ]
}

build_webui("build") {
  grd_prefix = "cr_components_history_embeddings"
  web_component_files = [
    "filter_chips.ts",
    "history_embeddings.ts",
  ]
  non_web_component_files = [ "browser_proxy.ts" ]
  icons_html_files = [ "icons.html" ]

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

  ts_out_dir =
      "$root_gen_dir/ui/webui/resources/tsc/cr_components/history_embeddings"
  ts_composite = true
  ts_deps = [
    "//third_party/polymer/v3_0:library",
    "//ui/webui/resources/cr_components/history:build_ts",
    "//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")
}