import {
  describe,
  expect,
  it
} from 'vitest';

import { shouldShowMobileAppServersRail } from './mobile-shell-layout.rules';

describe('shouldShowMobileAppServersRail', () => {
  it('shows the rail on mobile discovery routes', () => {
    expect(shouldShowMobileAppServersRail('/dashboard')).toBe(true);
    expect(shouldShowMobileAppServersRail('/people')).toBe(true);
    expect(shouldShowMobileAppServersRail('/servers')).toBe(true);
    expect(shouldShowMobileAppServersRail('/create-server')).toBe(true);
  });

  it('hides the rail on routes that embed their own mobile navigation rail', () => {
    expect(shouldShowMobileAppServersRail('/room/abc')).toBe(false);
    expect(shouldShowMobileAppServersRail('/dm')).toBe(false);
    expect(shouldShowMobileAppServersRail('/dm/123')).toBe(false);
    expect(shouldShowMobileAppServersRail('/pm')).toBe(false);
    expect(shouldShowMobileAppServersRail('/call/abc')).toBe(false);
  });

  it('hides the rail on auth routes', () => {
    expect(shouldShowMobileAppServersRail('/login')).toBe(false);
    expect(shouldShowMobileAppServersRail('/register')).toBe(false);
  });
});
