/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable global-require */
import { configure, getStorybookUI } from '@storybook/react-native'
import { AppRegistry } from 'react-native'
import { config } from '../src/config/index'
import './rn-addons'

configure(() => {
  require('./stories')
}, module)

const StorybookUIRoot = getStorybookUI({
  onDeviceUI: false,
  asyncStorage: require('@react-native-community/async-storage').default,
})

AppRegistry.registerComponent(config.application.name, () => StorybookUIRoot)

export default StorybookUIRoot
