import { RotateCcw } from 'lucide-react';
import { __ } from '@wordpress/i18n';

export function PageHeader( { title, onReset } ) {
	return (
		<div className="mb-5 flex items-center justify-between">
			<h2 className="m-0 text-2xl font-light text-gray-900">{ title }</h2>
			{ onReset && (
				<button
					type="button"
					onClick={ onReset }
					className="flex cursor-pointer items-center gap-1.5 border-0 bg-transparent p-0 text-sm text-primary hover:text-primary-hover"
				>
					<RotateCcw className="size-4" />
					{ __( 'Reset to Default', 'advanced-ads' ) }
				</button>
			) }
		</div>
	);
}
