/* @aztlan/generator-front 3.1.2 */
import {
  Meta, StoryObj,
} from '@storybook/react'
import { graphql } from 'react-relay'
import decorators from 'story-utils/decorators.js'
import Component from './DebugForm.js'

const meta: Meta<typeof Component> = {
  title     :'pages/DebugForm',
  component :Component,
  decorators:[
    decorators.components.Intl,
    decorators.components.Relay,
  ],
  parameters:{ layout: 'fullscreen' },
}

export default meta

const FRUITS_OPTIONS_QUERY = graphql`
  query DebugFormFruitOptionsQuery {
    fruits {
      value
      label
      disabled
    }
  }
`
const USERNAME_VALIDATION_QUERY = graphql`
  query DebugFormUsernameValidationQuery($value: String!) {
    isUsernameAvailable(value: $value)
  }
`

export const Base: StoryObj<typeof Component> = {
  args:{
    FRUITS_OPTIONS_QUERY,
    USERNAME_VALIDATION_QUERY,
  },
}
