<?php
/**
 * Shipments page view.
 *
 * @package DhlPolska\Admin
 *
 * @var \WP_List_Table|\DhlPolska\Admin\Shipments\ShipmentsListTable $table
 * @var array{type: string, message: string}|null                    $notice
 * @var string                                                        $menu_slug
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}


?>
<div class="wrap">
	<h1><?php esc_html_e( 'Przesyłki', 'dhl-polska' ); ?></h1>
	<?php if ( $notice ) : ?>
		<div class="notice notice-<?php echo esc_attr( $notice['type'] ); ?>">
			<p><?php echo esc_html( $notice['message'] ); ?></p>
		</div>
	<?php endif; ?>
	<form method="get">
		<input type="hidden" name="page" value="<?php echo esc_attr( $menu_slug ); ?>" />
		<?php if ( method_exists( $table, 'render_request_nonce_field' ) ) : ?>
			<?php $table->render_request_nonce_field(); ?>
		<?php endif; ?>
		<?php $table->search_box( esc_html__( 'Szukaj przesyłek', 'dhl-polska' ), 'dhl-polska-shipments' ); ?>
		<?php $table->display(); ?>
	</form>
</div>
