load("@rules_closure//closure:defs.bzl", "closure_js_library")
load("//javascript:defs.bzl", "closure_js_deps")

package(default_visibility = ["//visibility:public"])

licenses(["notice"])

closure_js_library(
    name = "library",
    exports = [
        "//third_party/closure/goog/array",
        "//third_party/closure/goog/asserts",
        "//third_party/closure/goog/async:delay",
        "//third_party/closure/goog/async:nexttick",
        "//third_party/closure/goog/async:run",
        "//third_party/closure/goog/color",
        "//third_party/closure/goog/debug",
        "//third_party/closure/goog/debug:divconsole",
        "//third_party/closure/goog/debug:error",
        "//third_party/closure/goog/disposable",
        "//third_party/closure/goog/dom",
        "//third_party/closure/goog/dom:forms",
        "//third_party/closure/goog/events",
        "//third_party/closure/goog/events:browserevent",
        "//third_party/closure/goog/events:eventtype",
        "//third_party/closure/goog/events:keycodes",
        "//third_party/closure/goog/functions",
        "//third_party/closure/goog/fx",
        "//third_party/closure/goog/fx:dragdropgroup",
        "//third_party/closure/goog/html:safehtml",
        "//third_party/closure/goog/html:safescript",
        "//third_party/closure/goog/html:safestyle",
        "//third_party/closure/goog/html:safeurl",
        "//third_party/closure/goog/html:trustedresourceurl",
        "//third_party/closure/goog/html:uncheckedconversions",
        "//third_party/closure/goog/i18n:bidi",
        "//third_party/closure/goog/iter",
        "//third_party/closure/goog/json",
        "//third_party/closure/goog/labs/useragent",
        "//third_party/closure/goog/labs/useragent:browser",
        "//third_party/closure/goog/labs/useragent:engine",
        "//third_party/closure/goog/labs/useragent:platform",
        "//third_party/closure/goog/log",
        "//third_party/closure/goog/math",
        "//third_party/closure/goog/math:coordinate",
        "//third_party/closure/goog/math:rect",
        "//third_party/closure/goog/math:size",
        "//third_party/closure/goog/net:xmlhttp",
        "//third_party/closure/goog/object",
        "//third_party/closure/goog/positioning",
        "//third_party/closure/goog/promise",
        "//third_party/closure/goog/reflect",
        "//third_party/closure/goog/string",
        "//third_party/closure/goog/string:const",
        "//third_party/closure/goog/structs",
        "//third_party/closure/goog/structs:map",
        "//third_party/closure/goog/structs:set",
        "//third_party/closure/goog/style",
        "//third_party/closure/goog/timer",
        "//third_party/closure/goog/ui:component",
        "//third_party/closure/goog/ui/editor:defaulttoolbar",
        "//third_party/closure/goog/uri",
        "//third_party/closure/goog/useragent",
        "//third_party/closure/goog/useragent:product",
        "//third_party/closure/goog/useragent:product_isversion",
        "//third_party/closure/goog/utils",
        "//third_party/closure/goog/window",
    ],
)

closure_js_library(
    name = "testing",
    testonly = True,
    exports = [
        "//third_party/closure/goog/testing:asserts",
        "//third_party/closure/goog/testing:expectedfailures",
        "//third_party/closure/goog/testing:jsunit",
        "//third_party/closure/goog/testing:jsunitexception",
        "//third_party/closure/goog/testing:mockclock",
        "//third_party/closure/goog/testing:mockcontrol",
        "//third_party/closure/goog/testing:performancetable",
        "//third_party/closure/goog/testing:performancetimer",
        "//third_party/closure/goog/testing:propertyreplacer",
        "//third_party/closure/goog/testing:recordfunction",
        "//third_party/closure/goog/testing:stacktrace",
        "//third_party/closure/goog/testing:strictmock",
        "//third_party/closure/goog/testing:testcase",
    ],
)

closure_js_library(
    name = "goog",
    srcs = ["goog.js"],
    lenient = True,
    no_closure_library = True,
)

filegroup(
    name = "base",
    srcs = [
        "base.js",
    ],
)

closure_js_deps(
    name = "deps",
    testonly = True,
    deps = [
        ":library",
        ":testing",
    ],
)

alias(
    name = "css",
    actual = "//third_party/closure/goog/css",
)
