load("//tools/lint:lint.bzl", "add_lint_tests")
load(
    "//tools/skylark:drake_cc.bzl",
    "drake_cc_binary",
    "drake_cc_googletest",
    "drake_cc_library",
)

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

drake_cc_library(
    name = "compass_gait_vector_types",
    srcs = [
        "compass_gait_continuous_state.cc",
        "compass_gait_params.cc",
    ],
    hdrs = [
        "compass_gait_continuous_state.h",
        "compass_gait_params.h",
        "gen/compass_gait_continuous_state.h",
        "gen/compass_gait_params.h",
    ],
    visibility = ["//visibility:public"],
    deps = [
        "//common:dummy_value",
        "//common:essential",
        "//common:name_value",
        "//common/symbolic:expression",
        "//systems/framework:vector",
    ],
)

drake_cc_library(
    name = "compass_gait",
    srcs = ["compass_gait.cc"],
    hdrs = [
        "compass_gait.h",
    ],
    visibility = ["//visibility:public"],
    deps = [
        ":compass_gait_vector_types",
        "//common:default_scalars",
        "//common:essential",
        "//systems/framework:leaf_system",
    ],
)

drake_cc_library(
    name = "compass_gait_geometry",
    srcs = ["compass_gait_geometry.cc"],
    hdrs = ["compass_gait_geometry.h"],
    visibility = ["//visibility:public"],
    deps = [
        ":compass_gait",
        "//geometry:geometry_roles",
        "//geometry:scene_graph",
        "//math:geometric_transform",
        "//systems/framework:diagram_builder",
        "//systems/framework:leaf_system",
    ],
)

drake_cc_binary(
    name = "simulate",
    srcs = ["simulate.cc"],
    add_test_rule = 1,
    test_rule_args = ["--target_realtime_rate=0.0"],
    deps = [
        ":compass_gait",
        ":compass_gait_geometry",
        "//geometry:drake_visualizer",
        "//systems/analysis:simulator",
        "//systems/framework:diagram_builder",
        "@gflags",
    ],
)

drake_cc_googletest(
    name = "compass_gait_test",
    deps = [
        ":compass_gait",
        "//common/test_utilities:eigen_matrix_compare",
        "//common/test_utilities:expect_no_throw",
        "//systems/framework/test_utilities:scalar_conversion",
    ],
)

drake_cc_googletest(
    name = "compass_gait_geometry_test",
    deps = [
        ":compass_gait",
        ":compass_gait_geometry",
    ],
)

add_lint_tests(enable_clang_format_lint = False)
