import React from 'react';

interface DatosComunesToggleProps {
    isDatosComunes: boolean;
    onToggle: () => void;
}

const DatosComunesToggle: React.FC<DatosComunesToggleProps> = ({
    isDatosComunes,
    onToggle
}) => {
    return (
        <div className="d-flex justify-content-end mb-3">
            <button
                type="button"
                className="btn"
                style={{
                    padding: '8px 16px',
                    borderRadius: '6px',
                    fontWeight: 500,
                    boxShadow: isDatosComunes ? 'inset 2px 2px 8px #ffd699' : undefined,
                    background: isDatosComunes ? 'orange' : '#fff7e6',
                    border: '2px solid orange',
                    color: isDatosComunes ? '#fff' : 'orange',
                    transition: 'all 0.2s'
                }}
                onClick={onToggle}
            >
                {isDatosComunes ? 'Los Datos son Comunes' : 'Los Datos no son comunes'}
            </button>
        </div>
    );
};

export default DatosComunesToggle;

