declare module '*.css' {}

export {}

declare global {
	interface BeforeInstallPromptEvent extends Event {
		prompt(): Promise<void>
		userChoice: Promise<{ outcome: 'accepted' | 'dismissed' }>
	}

	interface RelatedApplication {
		platform: string
		url?: string
		id?: string
	}

	interface Navigator {
		getInstalledRelatedApps?(): Promise<RelatedApplication[]>
	}

	interface Window {
		webkit?: {
			messageHandlers?: Record<
				string,
				{ postMessage: (payload: any) => void }
			>
		}
		__nativeCallback?: (res: NotificationResult) => void
	}

	interface NotificationResult {
		status: 'authorized' | 'notDetermined' | 'denied' | 'requested' | 'unknown'
		token: string | null
		id: string | null
	}
}
