chromium/ui/webui/resources/cr_components/customize_color_scheme_mode/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 = [ "customize_color_scheme_mode.mojom" ]

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

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

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

  static_files = [
    "dark_mode.svg",
    "light_mode.svg",
    "system_mode.svg",
  ]

  non_web_component_files = [
    "browser_proxy.ts",
    "customize_color_scheme_mode.html.ts",
    "customize_color_scheme_mode.ts",
    "segmented_button.html.ts",
    "segmented_button_option.html.ts",
    "segmented_button_option.ts",
    "segmented_button.ts",
  ]
  css_files = [
    "customize_color_scheme_mode.css",
    "segmented_button.css",
    "segmented_button_option.css",
  ]

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

  ts_out_dir = "$root_gen_dir/ui/webui/resources/tsc/cr_components/customize_color_scheme_mode"
  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")
}