export interface AppBridgeMessage {
  type: string;
  data?: any;
  callback?: string;
}

export interface AppBridgeResponse {
  success: boolean;
  data?: any;
  error?: string;
}

export enum BridgeMessageType {
  // 네이티브 앱 정보
  GET_APP_INFO = 'getAppInfo',
  GET_DEVICE_INFO = 'getDeviceInfo',
  
  // 네비게이션
  NAVIGATE_BACK = 'navigateBack',
  NAVIGATE_TO = 'navigateTo',
  NAVIGATE_TO_LOGIN = 'navigateToLogin',
  CLOSE_WEBVIEW = 'closeWebView',
  
  // 알림
  SHOW_TOAST = 'showToast',
  SHOW_ALERT = 'showAlert',
  SHOW_CONFIRM = 'showConfirm',
  
  // 결제
  PROCESS_PAYMENT = 'processPayment',
  CANCEL_PAYMENT = 'cancelPayment',
  
  // 저장소
  SET_STORAGE = 'setStorage',
  GET_STORAGE = 'getStorage',
  REMOVE_STORAGE = 'removeStorage',

  // 토큰 요청
  REQUEST_TOKEN = 'requestToken',
  REQUEST_REFRESH_TOKEN = 'requestRefreshToken',
  
  // 카메라/갤러리
  OPEN_CAMERA = 'openCamera',
  OPEN_GALLERY = 'openGallery',
  
  // 위치
  GET_LOCATION = 'getLocation',
  
  // 연락처
  GET_CONTACTS = 'getContacts',
  
  // 공유
  SHARE_CONTENT = 'shareContent',

  // 인증
  LOGIN = 'login',
  LOGOUT = 'logout',
  REGISTER_BIOMETRIC = 'registerBiometric',

  OPEN_BIOMETRIC_REGISTRATION_POPUP = 'openBiometricRegistrationPopup',
  CLOSE_BIOMETRIC_REGISTRATION_POPUP = 'closeBiometricRegistrationPopup',
  
  // 언어 설정
  SET_LANGUAGE = 'setLanguage',
  GET_LANGUAGE = 'getLanguage',
  
  // 알림 카운트 업데이트
  UPDATE_ALARM_COUNT = 'updateAlarmCount',

  // 푸시 알림 권한 확인
  IS_PUSH_NOTIFICATION_ENABLED = 'isPushNotificationEnabled',

  // 앱 설정 화면 열기
  OPEN_APP_SETTINGS = 'openAppSettings',

  // 로그인 방식 설정
  GET_LOGIN_TYPE = 'getLoginType',
  SET_LOGIN_TYPE = 'setLoginType',

    // 알림 수신 설정 (Android only)
  GET_NOTIFICATION_SETTING = 'getNotificationSetting',
  SET_NOTIFICATION_SETTING = 'setNotificationSetting'
}

export interface DeviceInfo {
  platform: 'ios' | 'android';
  version: string;
  model: string;
  uuid: string;
  appVersion: string;
}

export interface LocationInfo {
  latitude: number;
  longitude: number;
  accuracy: number;
  timestamp: number;
}

export interface ContactInfo {
  name: string;
  phone: string;
  email?: string;
}

export interface ShareContent {
  title: string;
  text: string;
  url?: string;
  image?: string;
}

export interface NotificationSettingResponse {
  success: boolean;
  enabled: boolean;
  needsPermission?: boolean;
  message?: string;
}