"use client";

import React, { createContext, useContext } from "react";

interface ScreenPreviewContextType {
  isPreviewMode: boolean; // true: 화면 관리(디자이너), false: 실제 화면
}

const ScreenPreviewContext = createContext<ScreenPreviewContextType>({
  isPreviewMode: false,
});

export const useScreenPreview = () => {
  return useContext(ScreenPreviewContext);
};

interface ScreenPreviewProviderProps {
  isPreviewMode: boolean;
  children: React.ReactNode;
}

export const ScreenPreviewProvider: React.FC<ScreenPreviewProviderProps> = ({ isPreviewMode, children }) => {
  return <ScreenPreviewContext.Provider value={{ isPreviewMode }}>{children}</ScreenPreviewContext.Provider>;
};
