<?php
/**
 * @var string $label
 * @var string $value
 * @var string $errors
 * @var string $locale
 */

if ($locale !== 'en') {
    try {
        echo '<script src="' . $this->asset('ckeditor5/translations/' . $locale . '.js', true) . '"></script>';
    } catch (Exception $exception) {
    }
}
?>
<script src="<?= $this->asset('ckeditor5/ckeditor.js', true) ?>"></script>
<div class="vue_app">
    <ckeditor-input-component
        upload_url="/guestbook/upload_file/"
        name="message"
        language="<?= $locale ?>"
        errors="<?= $errors ?? '' ?>"
        id="message2"
        label="<?= $label ?? '' ?>"
        value="<?= $value ?? '' ?>"
    ></ckeditor-input-component>
</div>
