import { buildProps, definePropType } from '@kankan/utils'
import type { ExtractPropTypes } from 'vue'

export const radioProps = buildProps({
    icon: {
        type: String,
    },
    tip: {
        type: String,
    },
    type: {
        type: String,
    },
    name: {
        type: String,
    },
    disabled: {
        type: Boolean,
        default: false,
    },
    modelValue: {
        type: Boolean,
        default: false,
    },
    placeholder: {
        type: String,
        default: '请输入',
    },
    maxlength: {
        type: definePropType<number | string>([Number, String]),
    },
    readonly: {
        type: Boolean,
        default: false,
    },
    other: {
        type: Object,
        default: () => ({}),
    },
    right: {
        type: Boolean,
    },
    width: {
        type: definePropType<number | string>([Number, String]),
        default: '',
    },
    height: {
        type: definePropType<number | string>([Number, String]),
        default: '',
    },
    label: {
        type: String,
    },
})

export type RadioProps = ExtractPropTypes<typeof radioProps>
