import React from "react";
import { render } from "@testing-library/react";
import { describe, it, expect, vi } from "vitest";
import { ScoreDetailsSlider } from "./index";
const useLocalContentMock = vi.fn();
vi.mock("~/sdks/LocalContent/context", () => ({
    useLocalContent: () => useLocalContentMock(),
}));
vi.mock("~/sdks/LocalContent/components/BottomSlider", () => ({
    BottomSlider: ({ children }) => (React.createElement("div", { "data-testid": "bottom-slider" },
        "Bottom Slider",
        children)),
}));
vi.mock("../Score", () => ({
    Score: (_props) => (React.createElement("div", { "data-testid": "score-component" }, "Score Component")),
}));
vi.mock("../ScoreComparison", () => ({
    ScoreComparison: (_props) => (React.createElement("div", { "data-testid": "score-comparison-component" }, "Score Comparison Component")),
}));
vi.mock("../ScoreText", () => ({
    ScoreText: (_props) => (React.createElement("div", { "data-testid": "score-text-component" }, "Score Text")),
}));
vi.mock("../ScorePoiList", () => ({
    ScorePoiList: (_props) => (React.createElement("div", { "data-testid": "score-poi-list-component" }, "Score POI List")),
}));
describe("ScoreDetailsSlider", () => {
    beforeEach(() => {
        useLocalContentMock.mockClear();
    });
    it("renders correctly when isCommuteCalculatorOpen is false", () => {
        useLocalContentMock.mockReturnValueOnce({
            isCommuteCalculatorOpen: false,
        });
        const { getByTestId } = render(React.createElement(ScoreDetailsSlider, null));
        expect(getByTestId("bottom-slider")).toBeInTheDocument();
        expect(getByTestId("score-component")).toBeInTheDocument();
        expect(getByTestId("score-comparison-component")).toBeInTheDocument();
        expect(getByTestId("score-text-component")).toBeInTheDocument();
        expect(getByTestId("score-poi-list-component")).toBeInTheDocument();
    });
    it("does not render when isCommuteCalculatorOpen is true", () => {
        useLocalContentMock.mockReturnValueOnce({
            isCommuteCalculatorOpen: true,
        });
        const { queryByTestId } = render(React.createElement(ScoreDetailsSlider, null));
        expect(queryByTestId("bottom-slider")).not.toBeInTheDocument();
    });
});
//# sourceMappingURL=index.test.js.map