'use client';

import dynamic from 'next/dynamic';

const IS_ENABLED = process.env.NEXT_PUBLIC_FEEDBACK_ENABLED === 'true';

const FeedbackOverlay = IS_ENABLED 
  ? dynamic(
      () => import('@mintel/next-feedback/FeedbackOverlay').then((mod) => mod.FeedbackOverlay),
      { ssr: false },
    )
  : () => null;

export default function FeedbackClientWrapper() {
  if (!IS_ENABLED) return null;

  return <FeedbackOverlay />;
}
