export function SettingsToolbar( { classicUrl, dashboardUrl, switchClassicUrl, i18n, variant = 'settings' } ) {
	const classic = classicUrl || window.newsroomSettingsBoot?.classicUrl || '';
	const dashClassic = window.newsroomSettingsBoot?.classicDashUrl || '';
	const dash = dashboardUrl || window.newsroomSettingsBoot?.dashboardPageUrl || '';
	const switchUrl = switchClassicUrl || window.newsroomSettingsBoot?.switchClassicUrl || '';
	const isDash = variant === 'dashboard';

	return (
		<div className="newsroom-settings__toolbar nros-card">
			<div className="newsroom-settings__toolbar-copy">
				<strong>{ isDash ? ( i18n?.classicDashTitle || 'Full dashboard' ) : ( i18n?.classicTitle || 'Need every option?' ) }</strong>
				<p>
					{ isDash
						? ( i18n?.classicDashDesc || 'Classic dashboard includes kanban, radar, and the full task form.' )
						: ( i18n?.classicDesc || 'Classic settings include schema JSON preview, indexing JSON upload, and the original tabbed form.' ) }
				</p>
			</div>
			<div className="newsroom-settings__toolbar-actions">
				{ isDash && dashClassic && (
					<a href={ dashClassic } className="button button-secondary">
						{ i18n?.openClassic || 'Open classic dashboard' }
					</a>
				) }
				{ ! isDash && classic && (
					<a href={ classic } className="button button-secondary">
						{ i18n?.openClassic || 'Open classic settings' }
					</a>
				) }
				{ ! isDash && switchUrl && (
					<a href={ switchUrl } className="button">
						{ i18n?.switchClassicUi || 'Switch to classic UI' }
					</a>
				) }
				{ ! isDash && dash && (
					<a href={ dash } className="button">
						{ i18n?.openDashboard || 'Dashboard' }
					</a>
				) }
			</div>
		</div>
	);
}
