load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
load("//ts:copy.bzl", "copy_files_into_group")
load("compile_sass.bzl", "compile_sass")

compile_sass(
    srcs = glob(
        ["*.scss"],
        exclude = ["_*.scss"],
    ),
    group = "css_local",
    visibility = ["//visibility:private"],
)

copy_file(
    name = "core_css",
    src = "//ts/sass:core.css",
    out = "core.css",
)

copy_files_into_group(
    name = "editor",
    srcs = [
        "editor.css",
        "editable.css",
    ],
    package = "//ts/editor",
)

filegroup(
    name = "css",
    srcs = [
        "core.css",
        "css_local",
        "editor",
        "//qt/aqt/data/web/css/vendor",
    ],
    visibility = ["//qt:__subpackages__"],
)
