# Copyright 2020 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//chrome/common/features.gni")
import("//ui/webui/resources/tools/build_webui.gni")
import("//ui/webui/resources/tools/generate_grd.gni")
import("//ui/webui/webui_features.gni")
assert(is_linux || is_chromeos || is_win || is_mac)
build_webui("build") {
grd_prefix = "tab_search"
static_files = [
"alert_indicators/tab_audio_muting_rounded.svg",
"alert_indicators/tab_audio_rounded.svg",
"alert_indicators/tab_media_recording.svg",
"images/auto_tab_groups.svg",
"images/tab_search.svg",
"tab_search.html",
]
icons_html_files = [ "icons.html" ]
non_web_component_files = [
"app.html.ts",
"app.ts",
"lazy_list.ts",
"selectable_lazy_list.ts",
"search.ts",
"tab_data.ts",
"tab_group_color_helper.ts",
"auto_tab_groups/auto_tab_groups_failure.html.ts",
"auto_tab_groups/auto_tab_groups_failure.ts",
"auto_tab_groups/auto_tab_groups_group.html.ts",
"auto_tab_groups/auto_tab_groups_group.ts",
"auto_tab_groups/auto_tab_groups_in_progress.html.ts",
"auto_tab_groups/auto_tab_groups_in_progress.ts",
"auto_tab_groups/auto_tab_groups_new_badge.html.ts",
"auto_tab_groups/auto_tab_groups_new_badge.ts",
"auto_tab_groups/auto_tab_groups_not_started.html.ts",
"auto_tab_groups/auto_tab_groups_not_started_image.html.ts",
"auto_tab_groups/auto_tab_groups_not_started_image.ts",
"auto_tab_groups/auto_tab_groups_not_started.ts",
"auto_tab_groups/auto_tab_groups_page.html.ts",
"auto_tab_groups/auto_tab_groups_page.ts",
"auto_tab_groups/auto_tab_groups_results_actions.html.ts",
"auto_tab_groups/auto_tab_groups_results_actions.ts",
"auto_tab_groups/auto_tab_groups_results.html.ts",
"auto_tab_groups/auto_tab_groups_results.ts",
"declutter/declutter_page.html.ts",
"declutter/declutter_page.ts",
"tab_organization_selector_button.html.ts",
"tab_organization_selector_button.ts",
"tab_organization_selector.html.ts",
"tab_organization_selector.ts",
"tab_search_api_proxy.ts",
"tab_search_group_item.html.ts",
"tab_search_group_item.ts",
"tab_search_item.html.ts",
"tab_search_item.ts",
"tab_search_page.html.ts",
"tab_search_page.ts",
"tab_search_sync_browser_proxy.ts",
"tab_search.ts",
"tab_search_utils.ts",
"title_item.ts",
]
css_files = [
"app.css",
"lazy_list.css",
"selectable_lazy_list.css",
"tab_search_page.css",
"tab_group_shared_vars.css",
"auto_tab_groups/auto_tab_groups_failure.css",
"auto_tab_groups/auto_tab_groups_group.css",
"auto_tab_groups/auto_tab_groups_in_progress.css",
"auto_tab_groups/auto_tab_groups_new_badge.css",
"auto_tab_groups/auto_tab_groups_not_started.css",
"auto_tab_groups/auto_tab_groups_not_started_image.css",
"auto_tab_groups/auto_tab_groups_page.css",
"auto_tab_groups/auto_tab_groups_results_actions.css",
"auto_tab_groups/auto_tab_groups_results.css",
"auto_tab_groups/auto_tab_groups_shared_style.css",
"declutter/declutter_page.css",
"tab_organization_selector_button.css",
"tab_organization_selector.css",
"tab_search_group_item.css",
"tab_search_item.css",
]
mojo_files_deps = [
"//chrome/browser/ui/webui/tab_search:mojo_bindings_ts__generator",
"//chrome/browser/ui/webui/tabs:mojo_bindings_ts__generator",
"//components/tab_groups/public/mojom:mojo_bindings_ts__generator",
]
mojo_files = [
"$root_gen_dir/chrome/browser/ui/webui/tab_search/tab_search.mojom-webui.ts",
"$root_gen_dir/chrome/browser/ui/webui/tabs/tabs.mojom-webui.ts",
"$root_gen_dir/components/tab_groups/public/mojom/tab_group_types.mojom-webui.ts",
]
html_to_wrapper_template = "detect"
ts_composite = true
ts_definitions = [
"//tools/typescript/definitions/pending.d.ts",
"//tools/typescript/definitions/metrics_private.d.ts",
]
ts_deps = [
"//third_party/lit/v3_0:build_ts",
"//ui/webui/resources/cr_components/color_change_listener:build_ts",
"//ui/webui/resources/cr_components/localized_link:build_ts",
"//ui/webui/resources/cr_elements:build_ts",
"//ui/webui/resources/js:build_ts",
"//ui/webui/resources/mojo:build_ts",
]
webui_context_type = "trusted"
optimize = optimize_webui
if (optimize) {
optimize_webui_host = "tab-search.top-chrome"
optimize_webui_in_files = [ "tab_search.js" ]
}
}