chromium/ash/webui/os_feedback_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, "Non-ChromeOS builds cannot depend on //ash")

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

  css_files = [ "os_feedback_shared.css" ]

  icons_html_files = [ "help_resources_icons.html" ]

  web_component_files = [
    "confirmation_page.ts",
    "feedback_flow.ts",
    "file_attachment.ts",
    "help_content.ts",
    "search_page.ts",
    "share_data_page.ts",
  ]

  non_web_component_files = [
    "fake_data.ts",
    "fake_help_content_provider.ts",
    "fake_feedback_service_provider.ts",
    "feedback_constants.ts",
    "feedback_types.ts",
    "feedback_utils.ts",
    "mojo_interface_provider.ts",
    "questionnaire.ts",
  ]

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

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

  ts_composite = true

  ts_definitions = [ "//tools/typescript/definitions/chrome_send.d.ts" ]

  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_os_feedback"
  grit_output_dir = "$root_gen_dir/ash/webui"
}