# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.

include_defs("//COMPONENTS_DEFS")

litho_android_library(
    name = "widget",
    exported_deps = [
        COMPONENTS_TEXTLAYOUTBUILDER_TARGET,
        ":widget-bare",
    ],
    visibility = [
        "PUBLIC",
    ],
)

litho_android_library(
    name = "widget-bare",
    srcs = glob(["*.java"]),
    plugins = [
        COMPONENTS_PROCESSOR_TARGET,
    ],
    provided_deps = [
        COMPONENTS_ANDROIDSUPPORT_TARGET,
        COMPONENTS_ANDROIDSUPPORT_RECYCLERVIEW_TARGET,
        COMPONENTS_YOGA_TARGET,
        COMPONENTS_OSS_TARGET,
        COMPONENTS_UTILS_TARGET,
        COMPONENTS_INFERANNOTATIONS_TARGET,
        COMPONENTS_JSR_TARGET,
        COMPONENTS_VIEWCOMPAT_TARGET,
        COMPONENTS_TEXTLAYOUTBUILDER_TARGET,
    ],
    tests = [
        make_dep_path("litho-it/src/test/java/com/facebook/litho/widget:widget"),
    ],
    visibility = [
        "PUBLIC",
    ],
    deps =
        COMPONENTS_TEXTLAYOUTBUILDER_UTILS_TARGET + [
            COMPONENTS_WIDGET_ACCESSIBILITIES_TARGET,
            COMPONENTS_RES_TARGET,
        ],
)
