import React, { useState } from 'react';
import PrivacyPolicyEN from './PrivacyPolicyEN';
import PrivacyPolicyBG from './PrivacyPolicyBG';

export default function PrivacyPolicyContainer() {
  const [language, setLanguage] = useState('bg'); // default language is Bulgarian

  const toggleLanguage = () => {
    setLanguage(language === 'en' ? 'bg' : 'en');
  };

  return (
    <div className="bg-white shadow-lg rounded-lg overflow-hidden">
      <div className="px-4 py-5 sm:px-6">
        <button
          onClick={toggleLanguage}
          className="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded"
        >
          {language === 'en' ? 'На български' : 'In English'}
        </button>
      </div>
      <div className="border-t border-gray-200">
        {language === 'en' ? <PrivacyPolicyEN /> : <PrivacyPolicyBG />}
      </div>
    </div>
  );
}
