<?php $this->layout('main', ['title' => __('Custom Branding')]); ?>

<?php
/** @var \App\Assets $assets */
$assets
    ->load('codemirror_css');
?>

<script type="text/javascript" nonce="<?=$assets->getCspNonce() ?>">
    $(function() {

        $('textarea.css-editor').each(function() {
            CodeMirror.fromTextArea($(this)[0], {
                lineNumbers: true,
                theme: '<?=(($customization->getTheme() === 'light') ? 'default' : 'material') ?>'
            });
        });

        $('textarea.js-editor').each(function() {
            CodeMirror.fromTextArea($(this)[0], {
                lineNumbers: true,
                theme: '<?=(($customization->getTheme() === 'light') ? 'default' : 'material') ?>'
            });
        });
    });
</script>

<?=$form->render() ?>
