import { Canvas, Meta, ArgTypes } from '@storybook/blocks';
import { ThemeProvider } from 'styled-components';

import ChannelList from './';
import { _ChannelList } from './ChannelList.stories.tsx';
import { lightTheme } from '../../../../theme/';
import { GlobalStyles } from '../../../../theme/GlobalStyles';
import * as ChannelListStories from './ChannelList.stories.tsx';

<Meta of={ChannelListStories} />

# ChannelList

The ChannelList component displays a column of chat channels.

## Importing

```javascript
import { ChannelList } from 'amazon-chime-sdk-component-library-react';
```

## Example

<ThemeProvider theme={lightTheme}>
  <GlobalStyles/>
  <Canvas>
    <_ChannelList />
  </Canvas>
</ThemeProvider>

```jsx
<ChannelList
  activeChannelId={activeChannelId}
  setActiveChannelId={setActiveChannelId}
>
  <ChannelItem
    name='Channel 1'
    id='abc'
    actions={<PopOverItem children={<span>Option 1</span>} onClick={() => console.log('Option 1 clicked')} />}
  />
  <ChannelItem
    name='Channel 2'
    id='dce'
    actions={<PopOverItem children={<span>Option 1</span>} onClick={() => console.log('Option 1 clicked')} />}
  />
</ChannelList>
```

## Props

<ArgTypes of={ChannelList} />