import React, { ReactNode } from 'react';

interface ConditionalElementProps {
  visible: boolean;
  children: ReactNode;
}

/**
 * Wrapper that conditionally renders children based on visibility
 * Used with Elementor editor to show/hide elements
 */
const ConditionalElement: React.FC<ConditionalElementProps> = ({ visible, children }) => {
  if (!visible) return null;
  return <>{children}</>;
};

export default ConditionalElement;
