import type { ExtractPropTypes } from 'vue'
import { horCellProps } from '../hor-cell'
import { omit } from '@daysnap/utils'
import { makeBooleanProp, makeStringProp, makeArrayProp, makeNumericProp } from '../utils'
import type { RadioShape } from 'vant'

export const omitHorCellPropsInRadio = omit(horCellProps, [
  'value',
  'arrow',
  'ellipsis',
  'formatter',
  'lineClamp',
  'alignItemCenter',
])
type OptionItem = {
  [x: string]: any
}
export const horRadioProps = {
  ...omitHorCellPropsInRadio,
  disabled: makeBooleanProp(false),
  checkedColor: makeStringProp('#1989fa'),
  shape: makeStringProp<RadioShape>('round'),
  options: makeArrayProp<OptionItem>(),
  labelKey: makeStringProp('label'),
  valueKey: makeStringProp('value'),
  modelValue: makeNumericProp(''),
}

export type HorRadioProps = ExtractPropTypes<typeof horRadioProps>
