import {Dayjs} from 'dayjs'

export type TypePickerContentType = 'date' | 'year' | 'year-month' | 'month' | 'quarter';

export interface TypeLayoutItem {
    key: string | number
    text: string | number
    data?: {
        type: TypePickerContentType
        date: Dayjs
        outside?: boolean
    }
}

export interface TypeItemStatus {
    /**
     * 选择状态
     */
    selected?: boolean

    /**
     * 禁用状态
     */
    disabled?: boolean

    /**
     * 上个月 / 下个月的选项 (只有日期内容有效)
     */
    outside?: boolean

    /**
     * 是否今日 (只有日期内容有效)
     */
    today?: boolean

    /**
     * 范围状态
     */
    rangeType?: 'single' | 'start' | 'inside' | 'end'
}

export interface TypeItemEvent {
    onClick?: (itemValue?: number) => void
    onClickOutside?: (itemValue?: number) => void
    onMouseEnter?: (itemValue?: number) => void
    onMouseLeave?: (itemValue?: number) => void
}
