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

export const fileProps = buildProps({
    name: {
        type: String,
    },
    disabled: {
        type: [Boolean],
    },
    modelValue: {
        type: String,
        default: '',
    },
    placeholder: {
        type: String,
        default: '请输入',
    },
    othPlaceholder: {
        type: String,
        require: false,
        default: '',
    },
    accept: {
        type: String,
    },
    scale: {
        type: String,
    },
    multiple: {
        type: Boolean,
    },
    preview: {
        type: Boolean,
    },
    maxSize: {
        type: Number,
    },
    maxLen: {
        type: Number,
    },
})

export type FileProps = ExtractPropTypes<typeof fileProps>
