import { Switch as VanSwitch } from 'vant'
import { useFormInput } from '../../../hooks/form-input'
import { formInputProps, fromInputEmits } from '../../form-input-props'
export default {
  props: formInputProps,
  emits: [...fromInputEmits],
  setup (props, context) {
    const { proxyValue, securityConfig } = useFormInput(props, context)
    return () => <VanSwitch
      v-model={proxyValue.value}
      disabled={props.disabled}
      activeValue={securityConfig.value.activeValue ?? true}
      inactiveValue={securityConfig.value.inactiveValue ?? false}
    />
  }
}
