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

export const richTextProps = buildProps({
    type: {
        type: String,
    },
    name: {
        type: String,
    },
    width: {
        type: definePropType<number | string>([Number, String]),
    },
    height: {
        type: definePropType<number | string>([Number, 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: true,
    },
    other: {
        type: Object,
        default: () => ({}),
    },
    right: {
        type: Boolean,
    },
    className: {
        type: String,
    },
    labelValue: {
        type: String,
        require: false,
    },
    dbhide: {
        type: Boolean,
        default: true,
    },
})

export type RichTextProps = ExtractPropTypes<typeof richTextProps>
