"use client" import { createContext, type ReactNode, useContext, useState } from "react" import type { AlertTypeEnum } from "@scandic-hotels/common/constants/alert" type AlertType = AlertTypeEnum.Success | AlertTypeEnum.Alarm const ProfilingConsentAlertContext = createContext<{ alertType: AlertType | null setAlertType: (data: AlertType | null) => void }>({ alertType: null, setAlertType: () => {}, }) export function ProfilingConsentAlertProvider({ children, }: { children: ReactNode }) { const [alertType, setAlertType] = useState(null) return ( {children} ) } export const useProfilingConsentAlert = () => useContext(ProfilingConsentAlertContext)