<?php 

// This file is used across the frontend and backend of support ticket

defined( 'UADMIN_DIR' ) OR DIE;

# Insert Helpdesk CSS

events::addListener('@head:after', function() {
	$href = core::url( __DIR__. '/style.css' );
	echo "<link rel='stylesheet' href='{$href}'/>";
});


# Insert Helpdesk JS!

events::addListener('@body:after', function() {
	$src = core::url( Udash::ASSETS_DIR . '/js/autosize.js' );
?>
	<script type='module'>
		import autosize from <?php echo "'{$src}'\n"; ?>
		if( $('.chat-block textarea').length ) autosize( $('.chat-block textarea') );
	</script>
	<script src='<?php echo core::url( __DIR__ . '/script.js' ); ?>'></script>	
<?php });

