import { isRunningInExpoGo } from 'expo'; import { NativeModule, PermissionResponse, requireNativeModule } from 'expo-modules-core'; import { ProcessedColorValue } from 'react-native'; import { ExpoCalendar, ExpoCalendarAttendee, ExpoCalendarEvent, ExpoCalendarReminder, } from './ExpoCalendar.types'; import { Calendar, EntityTypes, Source } from '../Calendar'; import ExpoGoCalendarNextStub from './ExpoGoCalendarNextStub'; declare class ExpoCalendarNextModule extends NativeModule { ExpoCalendar: typeof ExpoCalendar; ExpoCalendarEvent: typeof ExpoCalendarEvent; ExpoCalendarAttendee: typeof ExpoCalendarAttendee; ExpoCalendarReminder: typeof ExpoCalendarReminder; createCalendar( details: Omit, 'color'> & { color: ProcessedColorValue | undefined } ): Promise; getDefaultCalendar(): ExpoCalendar; getDefaultCalendarSync(): unknown; getCalendars(type?: EntityTypes): Promise; listEvents( calendars: string[], startDate: string | Date, endDate: string | Date ): Promise; getCalendarById(calendarId: string): Promise; getEventById(eventId: string): Promise; getReminderById(reminderId: string): Promise; requestCalendarPermissions(): Promise; getCalendarPermissions(): Promise; requestRemindersPermissions(): Promise; getRemindersPermissions(): Promise; getSourcesSync(): Source[]; } export default isRunningInExpoGo() ? (ExpoGoCalendarNextStub as any as ExpoCalendarNextModule) : requireNativeModule('CalendarNext');