import type { ComputedRef, Ref, RenderFunction, SetupContext } from 'vue' import type { CalendarDateType, CalendarEmits as ElCalendarEmits, CalendarProps as ElCalendarProps } from 'element-plus' import type { CalendarProps, Dayjs } from '../base' import type { ComponentBaseOptions, ComponentSlotType, DefineComponentApp, DefineComponentInstance, Merge, } from '../common' export declare const KCalendar: DefineComponentApp export type KCalendarInstance = DefineComponentInstance export interface KCalendarConstructor extends ComponentBaseOptions, KCalendarMethods { props: KCalendarProps context: SetupContext getRefMaps(): KCalendarPrivateRef getComputeMaps(): KCalendarPrivateComputed renderVN: RenderFunction } export interface KCalendarPrivateRef { refElem: Ref } export interface KCalendarPrivateComputed { } export type KCalendarProps = Merge export type KCalendarEmits = ElCalendarEmits export interface KCalendarSlots { header: (_: { date: string }) => ComponentSlotType 'header-right': () => ComponentSlotType 'date-cell': (_: { data: CalendarDateCellSlotData }) => ComponentSlotType schedule: (_: { date: Date }) => ComponentSlotType } export type KCalendarMethods = { jumpDate: (type: CalendarDateType) => void handleLunar: (showLunar: boolean) => void selectedDay: ComputedRef pickDay: (day: Dayjs) => void selectDate: (date: CalendarDateType) => void calculateValidatedDateRange: (startDayjs: Dayjs, endDayjs: Dayjs) => [Dayjs, Dayjs][] } export type CalendarDateCellSlotData = { type: 'prev-month' | 'current-month' | 'next-month' isSelected: boolean day: string date: Date }