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

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

licenses(["notice"])

closure_js_library(
    name = "animationdelay",
    srcs = ["animationdelay.js"],
    lenient = True,
    deps = [
        "//third_party/closure/goog/disposable",
        "//third_party/closure/goog/events",
        "//third_party/closure/goog/functions",
    ],
)

closure_js_library(
    name = "delay",
    srcs = ["delay.js"],
    lenient = True,
    deps = [
        "//third_party/closure/goog/disposable",
        "//third_party/closure/goog/timer",
    ],
)

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

closure_js_library(
    name = "nexttick",
    srcs = [
        "nexttick.js",
    ],
    lenient = True,
    deps = [
        "//third_party/closure/goog/debug:entrypointregistry",
        "//third_party/closure/goog/dom",
        "//third_party/closure/goog/dom:tagname",
        "//third_party/closure/goog/functions",
        "//third_party/closure/goog/labs/useragent:browser",
        "//third_party/closure/goog/labs/useragent:engine",
    ],
)

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

closure_js_library(
    name = "run",
    srcs = ["run.js"],
    lenient = True,
    deps = [
        ":nexttick",
        ":throwexception",
        ":workqueue",
        "//third_party/closure/goog/asserts",
        "//third_party/closure/goog/debug:asyncstacktag",
    ],
)

closure_js_library(
    name = "workqueue",
    srcs = ["workqueue.js"],
    lenient = True,
    deps = [
        ":freelist",
        "//third_party/closure/goog/asserts",
    ],
)
