import { ReactNode } from "react" // @mui material components import Card from "@mui/material/Card" import Switch from "@mui/material/Switch" // ThreeD Garden components import MDBox from "~/components/mui/MDBox" import MDTypography from "~/components/mui/MDTypography" // ThreeD Garden context import { useMaterialUIController } from "~/context" // Declaring props types for ControllerCard interface Props { color?: | "primary" | "secondary" | "info" | "success" | "warning" | "error" | "dark" state?: boolean icon: ReactNode title: string description?: string onChange: () => void [key: string]: any } function ControllerCard({ color, state, icon, title, description, onChange, }: Props): JSX.Element { const [controller] = useMaterialUIController() const { darkMode } = controller return ( ({ background: darkMode && !state && background.card, })}> {state ? "On" : "Off"} {icon} {title} {description ? ( {description} ) : null} ) } // Declaring default props for ControllerCard ControllerCard.defaultProps = { color: "info", state: false, description: "", } export default ControllerCard