/** * Web implementation of the Daily Notification plugin * * @author Matthew Raymer * @version 2.0.0 */ import { WebPlugin } from '@capacitor/core'; import type { DailyNotificationPlugin, NotificationOptions, NotificationSettings, NotificationResponse, NotificationStatus, BatteryStatus, PowerState, PermissionStatus } from './definitions'; export class DailyNotificationWeb extends WebPlugin implements DailyNotificationPlugin { async scheduleDailyNotification(_options: NotificationOptions | any): Promise { // Web implementation placeholder console.log('Schedule daily notification called on web platform'); } async getLastNotification(): Promise { return { id: 'web-notification', title: 'Web Notification', body: 'This is a web notification', timestamp: Date.now() }; } async cancelAllNotifications(): Promise { console.log('Cancel all notifications called on web platform'); } async getNotificationStatus(): Promise { return { lastNotificationTime: Date.now(), nextNotificationTime: Date.now() + 86400000, // 24 hours settings: {} }; } async updateSettings(_settings: NotificationSettings): Promise { console.log('Update settings called on web platform'); } async getBatteryStatus(): Promise { return { level: 100, isCharging: false, powerState: 1, isOptimizationExempt: true }; } async requestBatteryOptimizationExemption(): Promise { console.log('Request battery optimization exemption called on web platform'); } async setAdaptiveScheduling(_options: { enabled: boolean }): Promise { console.log('Set adaptive scheduling called on web platform'); } async getPowerState(): Promise { return { powerState: 1, isOptimizationExempt: true }; } async checkPermissions(): Promise { return { status: 'granted', granted: true, notifications: 'granted', alert: true, badge: true, sound: true, lockScreen: true, carPlay: false }; } async requestPermissions(): Promise { return { status: 'granted', granted: true, notifications: 'granted', alert: true, badge: true, sound: true, lockScreen: true, carPlay: false }; } }