<?php 

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

defined( 'ADMIN_MOD_DIR' ) OR DIE;


// Add event listener to insert the stylesheet!

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


// Add event listener to insert the javascript!


events::addListener('@body::after', function() {
	$src = core::url( DASHBOARD_MOD_DIR . '/assets/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 });

