import { Switch as VanSwitch } from 'vant'
import { useFormInput } from '../../../hooks/form-input'
import { formInputProps } from '../../form-input-props'
export default {
  props: formInputProps,
  setup (props, context) {
    const { emitModelValue } = useFormInput(props, context)
    return () => <VanSwitch modelValue={props.modelValue}
      onUpdate:modelValue={emitModelValue}
      activeValue={props.config?.activeValue ?? true}
      inactiveValue={props.config?.inactiveValue ?? false}
    />
  }
}
