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

static_library("internal") {
  visibility = [
    ":*",
    "//chrome/browser/notebooks:factory",
  ]

  sources = [
    "empty_notebooks_service.cc",
    "empty_notebooks_service.h",
    "notebook_sync_bridge.cc",
    "notebook_sync_bridge.h",
    "notebooks_eligibility_service_impl.cc",
    "notebooks_eligibility_service_impl.h",
    "notebooks_model.cc",
    "notebooks_model.h",
    "notebooks_model_observer.h",
    "notebooks_network_service_impl.cc",
    "notebooks_network_service_impl.h",
    "notebooks_service_impl.cc",
    "notebooks_service_impl.h",
  ]

  public_deps = [
    "//base",
    "//components/endpoint_fetcher",
    "//components/notebooks/public",
    "//services/network/public/cpp",
    "//third_party/abseil-cpp:absl",
  ]

  deps = [
    "//components/keyed_service/core",
    "//components/signin/public/identity_manager",
    "//components/sync/base",
    "//components/sync/model",
    "//components/sync/protocol",
    "//net",
    "//url",
  ]
}

source_set("unit_tests") {
  testonly = true

  visibility = [ "//components/notebooks:unit_tests" ]

  sources = [
    "empty_notebooks_service_unittest.cc",
    "notebook_sync_bridge_unittest.cc",
    "notebooks_eligibility_service_impl_unittest.cc",
    "notebooks_model_unittest.cc",
    "notebooks_network_service_impl_unittest.cc",
    "notebooks_service_impl_unittest.cc",
  ]

  deps = [
    ":internal",
    "//base",
    "//base/test:test_support",
    "//components/signin/public/identity_manager:test_support",
    "//components/sync:test_support",
    "//net:test_support",
    "//services/network:test_support",
    "//testing/gmock",
    "//testing/gtest",
    "//url",
  ]
}
