load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("@npm_angular_bazel//:index.bzl", "ng_module")

package(default_visibility = ["//:__subpackages__"])

sass_binary(
    name = "todos-styles",
    src = "todos.component.scss",
)

# We don't import from these, but the generated ngfactory code will
NG_FACTORY_ADDED_IMPORTS = [
    "@npm//@angular/material",
]

ng_module(
    name = "todos",
    srcs = [
        "todos.component.ts",
        "todos.module.ts",
    ],
    assets = [
        "todos.component.html",
        ":todos-styles",
    ],
    tsconfig = "//src:tsconfig.json",
    deps = NG_FACTORY_ADDED_IMPORTS + [
        "//src/shared/material",
        "//src/app/todos/reducers",
        "@npm//@angular/common",
        "@npm//@angular/core",
        "@npm//@angular/forms",
        "@npm//@angular/router",
        "@npm//@ngrx/store",
        "@npm//rxjs",
    ],
)

filegroup(
    name = "todos_esm",
    srcs = [":todos"],
    output_group = "es6_sources",
)
