<?php defined('BASEPATH') or exit('No direct script access allowed');

$title = isset($title) ? $title : '';
$description = isset($description) ? $description : '';
$left = isset($left) ? $left : '';
$right = isset($right) ? $right : '';
$class = isset($class) ? $class : '';
?>

<div class="erp-toolbar erp-toolbar--compact<?= $class ? ' ' . $class : ''; ?>">
	<div class="min-w-0 flex-1 space-y-2">
		<?php if ($title !== '' || $description !== '') { ?>
			<div class="erp-toolbar-copy">
				<?php if ($title !== '') { ?>
					<p class="erp-toolbar-title"><?= html_escape($title); ?></p>
				<?php } ?>
				<?php if ($description !== '') { ?>
					<p class="erp-toolbar-description"><?= html_escape($description); ?></p>
				<?php } ?>
			</div>
		<?php } ?>
		<?php if ($left !== '') { ?>
			<div class="erp-toolbar-actions">
				<?= $left; ?>
			</div>
		<?php } ?>
	</div>
	<?php if ($right !== '') { ?>
		<div class="erp-toolbar-actions erp-toolbar-actions--right">
			<?= $right; ?>
		</div>
	<?php } ?>
</div>
