import { render, mockMatchMedia } from '../../test-utils';

import BottomSheet from './BottomSheet';

// eslint-disable-next-line @typescript-eslint/no-unsafe-call
mockMatchMedia();

describe('BottomSheet', () => {
  it('renders content when open', () => {
    const { baseElement } = render(
      <BottomSheet open onClose={jest.fn()}>
        <b>Test Content</b>
      </BottomSheet>,
    );
    expect(baseElement).toMatchSnapshot();
  });

  it('does not renders when closed', () => {
    const { container } = render(
      <BottomSheet open={false} onClose={jest.fn()}>
        content
      </BottomSheet>,
    );
    expect(container).toBeEmptyDOMElement();
  });
});
