<?php
namespace JetStudioModule\Pages;

use Jet\Http_Request;
use Jet\MVC_View;
use Jet\Tr;
use Jet\UI;
use JetStudio\JetStudio_UI;

/**
 * @var MVC_View $this
 */

$what = $this->getRaw( 'what' );

$tabs = UI::tabs(
	[
		'main'           => Tr::_( 'Main settings' ),
		'content'        => Tr::_( 'Content' ),
		'static_content' => Tr::_( 'Static content' ),
		'callback'       => Tr::_( 'Callback' )
	],
	function( $tab_id ) {
		return Http_Request::currentURI( ['what' => $tab_id], ['action'] );
	},
	$what
);

?>
<div style="padding: 5px;">
	<?= JetStudio_UI::messages(); ?>
</div>

<div class="container-fluid main-col">

	<?= $tabs ?>

	<div style="padding: 10px;">
		<?= $this->render( 'page/' . $what . '/edit/form' ); ?>
	</div>
</div>


