hunk.code_window:                       size="medium"
                         tooltip="Supported CAs are Comodo, DigiCert, Entrust and GoDaddy.<br>The certificate must contain the private key.<br>On AMT 15 based devices you need to use SHA2."
                         errors={errors.certFileContent}
                       >
                         <FileUploadField
                           inputId="certificate_file"
  
hunk.labels: keep keep add keep keep keep
hunk.after_edit:                       setTooltipHtmlMessage
  
hunk.file_path: app/react/portainer/settings/EdgeComputeView/SettingsOpenAMT/SettingsOpenAMT.tsx
hunk.type: add
file: import create from 'zustand/vanilla';
  import { persist } from 'zustand/middleware';
  
  import { keyBuilder } from '@/react/hooks/useLocalStorage';
  
  import { ToastNotification } from './types';
  
  interface NotificationsState {
    userNotifications: Record<string, ToastNotification[]>;
    addNotification: (userId: number, notification: ToastNotification) => void;
    removeNotification: (userId: number, notificationId: string) => void;
    removeNotifications: (userId: number, notifications: string[]) => void;
    clearUserNotifications: (userId: number) => void;
  }
  
  export const notificationsStore = create<NotificationsState>()(
    persist(
      (set) => ({
        userNotifications: {},
        addNotification: (userId: number, notification: ToastNotification) => {
          set((state) => ({
            userNotifications: {
              ...state.userNotifications,
              [userId]: [
                ...(state.userNotifications[userId] || []),
                notification,
              ],
            },
          }));
        },
        removeNotification: (userId: number, notificationId: string) => {
          set((state) => ({
            userNotifications: {
              ...state.userNotifications,
              [userId]: state.userNotifications[userId].filter(
                (notif) => notif.id !== notificationId
              ),
            },
          }));
        },
        removeNotifications: (userId: number, notificationIds: string[]) => {
          set((state) => ({
            userNotifications: {
              ...state.userNotifications,
              [userId]: state.userNotifications[userId].filter(
                (notification) => !notificationIds.includes(notification.id)
              ),
            },
          }));
        },
        clearUserNotifications: (userId: number) => {
          set((state) => ({
            userNotifications: {
              ...state.userNotifications,
              [userId]: [],
            },
          }));
        },
      }),
      {
        name: keyBuilder('notifications'),
      }
    )
  );
  