/**
 * @format
 */

import React from 'react'
import {ComponentStory, ComponentMeta} from '@storybook/react'
import {ChakraProvider} from '@chakra-ui/react'
import {vantagePlusTheme} from '../styles/theme'
import '../styles/fonts.css'
import {FormComponent} from '../components/UIcomponents'
import {unifiedSearchFilterData} from '../assets/mocks/formData'

const Template: ComponentStory<typeof FormComponent> = args => (
  <ChakraProvider theme={vantagePlusTheme}>
    <FormComponent {...args}>Button Text</FormComponent>
  </ChakraProvider>
)
export default {
  title: 'VantagePlus/Form',
  component: FormComponent
} as ComponentMeta<typeof FormComponent>

export const Form = Template.bind({})
// More on args: https://storybook.js.org/docs/react/writing-stories/args
Form.args = {
  submitHandler: (e: React.FormEvent<EventTarget>, formData: any) => {
    console.log('submitted', e, formData)
  },
  inputData: unifiedSearchFilterData
}
