# Copyright 2025 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_win || is_mac || is_linux)

build_webui("build") {
  ts_composite = true
  grd_prefix = "signin_history_sync_optin"

  static_files = [
    "history_sync_optin.html",
    "history_sync_optin_refresh.html",
    "images/avatar_surrounding_illustration_dark.svg",
    "images/avatar_surrounding_illustration_light.svg",
  ]

  ts_files = [
    "browser_proxy.ts",
    "history_sync_optin.ts",
    "history_sync_optin_refresh.ts",
    "history_sync_optin_app.html.ts",
    "history_sync_optin_app_refresh.html.ts",
    "history_sync_optin_app.ts",
    "history_sync_optin_app_refresh.ts",
  ]

  css_files = [
    "history_sync_optin_app.css",
    "history_sync_optin_app_refresh.css",
  ]

  mojo_files_deps = [ "//chrome/browser/ui/webui/signin/history_sync_optin:mojo_bindings_ts__generator" ]
  mojo_files = [ "$root_gen_dir/chrome/browser/ui/webui/signin/history_sync_optin/history_sync_optin.mojom-webui.ts" ]

  webui_context_type = "trusted"

  ts_deps = [
    "//third_party/lit/v3_0:build_ts",
    "//ui/webui/resources/cr_components/color_change_listener:build_ts",
    "//ui/webui/resources/cr_elements:build_ts",
    "//ui/webui/resources/js:build_ts",
    "//ui/webui/resources/mojo:build_ts",
  ]
}
