load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "rn_android_library")

rn_android_library(
    name = "imagehelper",
    srcs = glob(
        ["*.java"],
        exclude = ["MultiSourceHelper.java"],
    ),
    autoglob = False,
    is_androidx = True,
    labels = [
        "pfh:ReactNative_CommonInfrastructurePlaceholder",
        "supermodule:xplat/default/public.react_native.infra",
    ],
    language = "JAVA",
    visibility = [
        "PUBLIC",
    ],
    deps = [
        react_native_dep("third-party/android/androidx:annotation"),
        react_native_dep("third-party/java/infer-annotations:infer-annotations"),
        react_native_dep("third-party/java/jsr-305:jsr-305"),
    ],
)

rn_android_library(
    name = "withmultisource",
    srcs = ["MultiSourceHelper.java"],
    autoglob = False,
    is_androidx = True,
    labels = [
        "pfh:ReactNative_CommonInfrastructurePlaceholder",
        "supermodule:xplat/default/public.react_native.infra",
    ],
    language = "JAVA",
    visibility = [
        "PUBLIC",
    ],
    deps = [
        react_native_dep("third-party/android/androidx:annotation"),
        react_native_dep("libraries/fresco/fresco-react-native:imagepipeline"),
        react_native_dep("third-party/java/infer-annotations:infer-annotations"),
        react_native_dep("third-party/java/jsr-305:jsr-305"),
    ],
    exported_deps = [
        ":imagehelper",
    ],
)
