<?php
$department_options = array();
$department_options[''] = lang('select') . ' ' . lang('department');
if (!empty($departments)) {
	foreach ($departments as $department) {
		$department_options[$department->departments_id] = $department->deptname;
	}
}
?>

<div class="space-y-4">
	<?php echo form_open(base_url('admin/promotion/save_designation'), array('class' => 'space-y-4', 'data-parsley-validate' => 'true', 'role' => 'form')); ?>

	<div class="rounded-xl border border-border bg-card p-4 space-y-4">
		<?= form_select_group('departments_id', lang('department'), $department_options, '', true, array('data-live-search' => 'true')); ?>
		<?= form_input_group('designations', lang('designation'), '', 'text', true, array('placeholder' => lang('designation'))); ?>
	</div>

	<div class="flex items-center justify-end gap-2">
		<button type="button" class="inline-flex items-center rounded-lg border border-border bg-card px-3 py-2 text-xs font-semibold text-foreground hover:bg-muted" data-dismiss="modal">
			<?= lang('close') ?>
		</button>
		<?= btn_update(lang('save'), 'md') ?>
	</div>

	<?php echo form_close(); ?>
</div>
