import { ComponentType, createContext } from "react";

interface SlidePanelContextType {
  openPanel: (config: PanelConfig) => void;
  closePanel: () => void;
}

interface PanelConfig {
  title: string;
  Component: ComponentType<any>;
  value: any;
  onChange: (value: any) => void;
  componentProps?: Record<string, any>;
}

const SlidePanelContext = createContext<SlidePanelContextType | null>(null);

export { SlidePanelContext, type SlidePanelContextType, type PanelConfig };
