import { createContext, useContext, ReactNode } from 'react';

interface ClerkAvailabilityContextType {
  isClerkAvailable: boolean;
  publishableKey: string | null;
  loading: boolean;
}

export const ClerkAvailabilityContext = createContext<ClerkAvailabilityContextType>({
  isClerkAvailable: false,
  publishableKey: null,
  loading: true,
});

export function useClerkAvailability() {
  return useContext(ClerkAvailabilityContext);
}
