load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library")
load("@fbsource//xplat/pfh/triage_InfrastructureSupermoduleOptou:DEFS.bzl", "triage_InfrastructureSupermoduleOptou")
load("../../../defs.bzl", "folly_xplat_cxx_library")

oncall("fbcode_entropy_wardens_folly")

non_fbcode_target(
    _kind = folly_xplat_cxx_library,
    name = "async_closure",
    feature = triage_InfrastructureSupermoduleOptou,
    raw_headers = ["AsyncClosure.h"],
    exported_deps = [
        ":bind_async_closure",
        "//xplat/folly/coro:noexcept",
        "//xplat/folly/coro/safe:safe_task",
        "//xplat/folly/detail:tuple",
    ],
)

fbcode_target(
    _kind = cpp_library,
    name = "async_closure",
    headers = ["AsyncClosure.h"],
    exported_deps = [
        ":bind_async_closure",
        "//folly/coro:noexcept",
        "//folly/coro/safe:safe_task",
        "//folly/detail:tuple",
    ],
)

###

non_fbcode_target(
    _kind = folly_xplat_cxx_library,
    name = "bind_async_closure",
    feature = triage_InfrastructureSupermoduleOptou,
    raw_headers = ["BindAsyncClosure.h"],
    exported_deps = [
        "//xplat/folly/coro/safe:bind_captures",
        "//xplat/folly/coro/safe:captures",
        "//xplat/folly/lang:safe_alias",
        "//xplat/folly/lang/bind:named",
        "//xplat/folly/lang/bind:named_to_storage",
    ],
)

fbcode_target(
    _kind = cpp_library,
    name = "bind_async_closure",
    headers = ["BindAsyncClosure.h"],
    exported_deps = [
        "//folly/coro/safe:bind_captures",
        "//folly/coro/safe:captures",
        "//folly/lang:safe_alias",
        "//folly/lang/bind:named",
        "//folly/lang/bind:named_to_storage",
    ],
)

###

non_fbcode_target(
    _kind = folly_xplat_cxx_library,
    name = "define_movable_deep_const_lref_copyable",
    feature = triage_InfrastructureSupermoduleOptou,
    raw_headers = ["DefineMovableDeepConstLrefCopyable.h"],
)

fbcode_target(
    _kind = cpp_library,
    name = "define_movable_deep_const_lref_copyable",
    headers = ["DefineMovableDeepConstLrefCopyable.h"],
)
