chromium/chrome/browser/resources/side_panel/commerce/BUILD.gn

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

import("//ui/webui/resources/tools/build_webui.gni")

assert(!is_android)

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

  static_files = [ "shopping_insights.html" ]

  web_component_files = [
    "app.ts",
    "catalog_attributes_row.ts",
    "history_graph.ts",
    "insights_comment_row.ts",
    "price_tracking_section.ts",
  ]

  ts_composite = true
  ts_definitions = [ "//tools/typescript/definitions/metrics_private.d.ts" ]
  ts_deps = [
    "../shared:build_ts",
    "//third_party/polymer/v3_0:library",
    "//ui/webui/resources/cr_components/color_change_listener:build_ts",
    "//ui/webui/resources/cr_components/commerce:build_ts",
    "//ui/webui/resources/cr_elements:build_ts",
    "//ui/webui/resources/js:build_ts",
    "//ui/webui/resources/mojo:build_ts",
  ]
  ts_tsconfig_base = "tsconfig_base.json"
  ts_path_mappings =
      [ "//shopping-insights-side-panel.top-chrome/shared/*|" +
        rebase_path(
            "$root_gen_dir/chrome/browser/resources/side_panel/shared/tsc/*",
            target_gen_dir) ]

  webui_context_type = "trusted"
}