chromium/ash/webui/firmware_update_ui/resources/BUILD.gn

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

import("//build/config/chromeos/ui_mode.gni")
import("//ui/webui/resources/tools/build_webui.gni")

assert(is_chromeos_ash)

build_webui("build") {
  static_files = [
    "app_icon_192.png",
    "index.html",
  ]

  css_files = [
    "firmware_shared.css",
    "firmware_shared_fonts.css",
  ]

  web_component_files = [
    "firmware_confirmation_dialog.ts",
    "firmware_update_app.ts",
    "firmware_update_dialog.ts",
    "peripheral_updates_list.ts",
    "update_card.ts",
  ]

  icons_html_files = [ "icons.html" ]

  non_web_component_files = [
    "fake_data.ts",
    "fake_update_controller.ts",
    "fake_update_provider.ts",
    "firmware_update_types.ts",
    "firmware_update_utils.ts",
    "mojo_interface_provider.ts",
  ]

  mojo_files = [ "$root_gen_dir/ash/webui/firmware_update_ui/mojom/firmware_update.mojom-webui.ts" ]

  mojo_files_deps =
      [ "//ash/webui/firmware_update_ui/mojom:mojom_ts__generator" ]

  ts_composite = true

  ts_deps = [
    "//ash/webui/common/resources:build_ts",
    "//ash/webui/common/resources/cr_elements:build_ts",
    "//third_party/polymer/v3_0:library",
    "//ui/webui/resources/cr_components/color_change_listener:build_ts",
    "//ui/webui/resources/js:build_ts",
    "//ui/webui/resources/mojo:build_ts",
  ]

  webui_context_type = "trusted"
  grd_prefix = "ash_firmware_update_app"
  grit_output_dir = "$root_gen_dir/ash/webui"
}