import { describe, expect, it } from "vitest";
import { isDialogFlagOpen } from "../src/dimsdk/pages/ChatPage/logic/dialogs.ts";

describe("chat dialogs provider exit flag", () => {
  it("treats raw boolean as open state", () => {
    expect(isDialogFlagOpen(true)).toBe(true);
    expect(isDialogFlagOpen(false)).toBe(false);
  });

  it("treats ref-like shape as open state", () => {
    expect(isDialogFlagOpen({ value: true })).toBe(true);
    expect(isDialogFlagOpen({ value: false })).toBe(false);
  });
});
