// WemeetAdminContext.jsx
import React, { createContext, useContext, useState } from 'react';

// Create a context
const WemeetAdminContext = createContext();

// Create a provider component
export const WemeetAdminProvider = ({ children }) => {
  const [isModalOpen, setIsProModalOpen] = useState(false);

  const openProModal = () => setIsProModalOpen(true);
  const closeProModal = () => setIsProModalOpen(false);


  const contextValue = {
    isModalOpen,
    openProModal,
    closeProModal,
    // Add other functions here
  };

  return (
    <WemeetAdminContext.Provider value={contextValue}>
      {children}
    </WemeetAdminContext.Provider>
  );
};

// Custom hook to use the context
export const useWemeetAdmin = () => useContext(WemeetAdminContext);
