LuxKit Actions

const luxKit = createModal({
  chains,
  wagmi,
  projectId,
  appName,
});
//open LuxKit modal
luxKit.open();
 
//get open status
luxKit.getOpenState();
 
//close modal
luxKit.close();
 
luxKit.getOpenState();
 
//set dark mode
luxKit.setTheme("dark");
type LuxKitActions = {
  open: (params?: { forceOpen?: boolean } & Hook) => void;
  close: () => void;
  subscribeModalState: (fn: (open: boolean) => void) => () => void;
  getOpenState: () => boolean;
 
  getTheme: () => Theme;
  setTheme: (theme: Theme) => void;
  setThemeVariables: (themeVariables?: ThemeVariables) => void;
 
  getDisclaimer: () => Disclaimer | undefined;
  setDisclaimer: (disclaimer?: Disclaimer) => void;
 
  getCustomButtons: () => CustomButton[] | undefined;
  setCustomButtons: (customButtons?: CustomButton[]) => void;
 
  getLanguage: () => SUPPORT_LANGUAGES;
  // setLanguage: (language: SUPPORT_LANGUAGES) => void;
};
 
type Hook = {
  onConnect?: () => void;
  onConnectError?: (error: Error) => void;
  onModalClosed?: () => void;
  onModalClosedByManualOperation?: () => void;
};