// Importing the Ant Design Switch component import { Switch as AntdSwitch } from "antd"; // Defining the Props type for the Switch component // This includes the structure of the props passed to the component type Props = { state?: "AND" | "OR"; // Current state of the switch, either "AND" or "OR" placement?: "outside_group" | "inside_group"; // Placement of the switch relative to a group onChange: (state: "AND" | "OR") => void; // Callback function triggered when the switch state changes }; const Switch = ({ state, placement, onChange }: Props) => { return ( // Wrapper div with conditional styling based on placement