import { buildProps, definePropType } from '@kankan/utils'
import type { ExtractPropTypes } from 'vue'
export const textInputProps = buildProps({
    type: {
        type: String,
    },
    name: {
        type: String,
    },
    disabled: {
        type: Boolean,
        default: false,
    },
    modelValue: {
        type: String,
        required: false,
        default: '',
    },
    placeholder: {
        type: String,
        default: '请输入',
    },
    maxlength: {
        type: definePropType<number | string>([Number, String]),
    },
    readonly: {
        type: Boolean,
        default: false,
    },
    other: {
        type: Object,
        default: () => ({}),
    },
    right: {
        type: Boolean,
    },
})

export type TextInputProps = ExtractPropTypes<typeof textInputProps>
