chromium/ui/webui/resources/cr_components/theme_color_picker/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("//mojo/public/tools/bindings/mojom.gni")
import("//ui/webui/resources/tools/build_webui.gni")

assert(!is_android && !is_ios)

mojom("mojom") {
  sources = [ "theme_color_picker.mojom" ]

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

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

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

  css_files = [
    "check_mark_wrapper.css",
    "theme_color.css",
    "theme_color_picker.css",
    "theme_hue_slider_dialog.css",
  ]

  non_web_component_files = [
    "browser_proxy.ts",
    "check_mark_wrapper.html.ts",
    "check_mark_wrapper.ts",
    "color_utils.ts",
    "theme_color.html.ts",
    "theme_color_picker.html.ts",
    "theme_color_picker.ts",
    "theme_color.ts",
    "theme_hue_slider_dialog.html.ts",
    "theme_hue_slider_dialog.ts",
  ]

  mojo_files_deps = [ ":mojom_ts__generator" ]
  mojo_files = [ "$target_gen_dir/theme_color_picker.mojom-webui.ts" ]

  ts_out_dir =
      "$root_gen_dir/ui/webui/resources/tsc/cr_components/theme_color_picker"
  ts_composite = true
  ts_deps = [
    "//third_party/lit/v3_0: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")
}