import { Capacitor, registerPlugin } from '@capacitor/core'; const KioskSettings = Capacitor.isNativePlatform() ? registerPlugin('KioskSettings') : null; function ensureNativeSupport() { if (!KioskSettings) { throw new Error('settings_unavailable'); } } export function canOpenKioskSettings() { return Boolean(KioskSettings); } export async function openWifiSettings() { ensureNativeSupport(); return KioskSettings.openWifiSettings(); } export async function openNetworkSettings() { ensureNativeSupport(); return KioskSettings.openNetworkSettings(); } export async function openDeviceSettings() { ensureNativeSupport(); return KioskSettings.openDeviceSettings(); }