import React from 'react';
import { storiesOf } from '@storybook/react';
import { boolean, select, text } from '@storybook/addon-knobs';

import { asyncStates } from '../../storybook/utils';
import Pane from './component';

const props = ({
  isTouchDevice = false,
  title = 'title',
  children = 'child component',
  // onFullscreenToggleCb = undefined,
  asyncStatus = undefined,
  asyncStatusList = undefined,
} = {}) => ({
  isTouchDevice: boolean('isTouchDevice', isTouchDevice),
  title: text('title', title),
  children: text('children', children),
  asyncStatus: select('async status', asyncStates({ isList: false }), asyncStatus),
  asyncStatusList: select('async status list', asyncStates({ isList: true }), asyncStatusList),
});

storiesOf('Web|Pane', module)
  .add('default', () => (
    <Pane {...props()} />
  ))
