import type { VueTypesDefaults } from 'vue-types/dist/types'
import type { CSSProperties, VNodeChild } from 'vue'
import type { VueTypeValidableDef } from 'vue-types'
import VueTypes, { toValidableType } from 'vue-types'

export type VueNode = VNodeChild | JSX.Element

VueTypes.sensibleDefaults = {
    ...(VueTypes.sensibleDefaults as Partial<VueTypesDefaults>),
    func: undefined,
    bool: undefined,
    string: undefined,
    number: undefined,
    object: undefined,
    integer: undefined,
}

class PropTypes extends VueTypes {
    static get style(): VueTypeValidableDef<CSSProperties> {
        return toValidableType('style', {
            type: [String, Object],
            default: undefined,
        })
    }

    static get VNodeChild(): VueTypeValidableDef<VueNode> {
        return toValidableType('VNodeChild', {
            type: undefined,
        })
    }
}

export { PropTypes as propTypes }
