<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;

$__newAttributes = [];
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames(([
    'name',
    'label',
    'value' => null,
    'help' => null,
]));

foreach ($attributes->all() as $__key => $__value) {
    if (in_array($__key, $__propNames)) {
        $$__key = $$__key ?? $__value;
    } else {
        $__newAttributes[$__key] = $__value;
    }
}

$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);

unset($__propNames);
unset($__newAttributes);

foreach (array_filter(([
    'name',
    'label',
    'value' => null,
    'help' => null,
]), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
    $$__key = $$__key ?? $__value;
}

$__defined_vars = get_defined_vars();

foreach ($attributes->all() as $__key => $__value) {
    if (array_key_exists($__key, $__defined_vars)) unset($$__key);
}

unset($__defined_vars, $__key, $__value); ?>

<?php
    $fieldId = 'field-' . str_replace(['[', ']', '.'], '-', $name);
?>

<div class="flex flex-col gap-1.5">
    <label class="text-sm font-medium text-brand-ink" id="<?php echo e($fieldId); ?>-label"><?php echo e($label); ?></label>

    <div data-richtext class="overflow-hidden rounded-lg border border-brand-border">
        <div role="toolbar" aria-label="Mise en forme du texte" class="flex flex-wrap items-center gap-0.5 border-b border-brand-border bg-brand-surface p-1.5">
            <button type="button" data-richtext-command="bold" class="btn-ghost btn-sm rounded px-2 py-1 font-bold" title="Gras">G</button>
            <button type="button" data-richtext-command="italic" class="btn-ghost btn-sm rounded px-2 py-1 italic" title="Italique">I</button>
            <button type="button" data-richtext-command="createLink" class="btn-ghost btn-sm rounded px-2 py-1" title="Lien">
                <?php if (isset($component)) { $__componentOriginalce262628e3a8d44dc38fd1f3965181bc = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalce262628e3a8d44dc38fd1f3965181bc = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.icon','data' => ['name' => 'external','class' => 'h-3.5 w-3.5']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('icon'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['name' => 'external','class' => 'h-3.5 w-3.5']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalce262628e3a8d44dc38fd1f3965181bc)): ?>
<?php $attributes = $__attributesOriginalce262628e3a8d44dc38fd1f3965181bc; ?>
<?php unset($__attributesOriginalce262628e3a8d44dc38fd1f3965181bc); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalce262628e3a8d44dc38fd1f3965181bc)): ?>
<?php $component = $__componentOriginalce262628e3a8d44dc38fd1f3965181bc; ?>
<?php unset($__componentOriginalce262628e3a8d44dc38fd1f3965181bc); ?>
<?php endif; ?>
            </button>
            <span class="mx-1 h-4 w-px bg-brand-border" aria-hidden="true"></span>
            <button type="button" data-richtext-command="insertUnorderedList" class="btn-ghost btn-sm rounded px-2 py-1" title="Liste à puces">•—</button>
            <button type="button" data-richtext-command="insertOrderedList" class="btn-ghost btn-sm rounded px-2 py-1" title="Liste numérotée">1.</button>
            <button type="button" data-richtext-command="formatBlock" data-richtext-value="h3" class="btn-ghost btn-sm rounded px-2 py-1" title="Titre">H</button>
            <button type="button" data-richtext-command="formatBlock" data-richtext-value="blockquote" class="btn-ghost btn-sm rounded px-2 py-1" title="Citation">"</button>
            <span class="mx-1 h-4 w-px bg-brand-border" aria-hidden="true"></span>
            <button type="button" data-richtext-command="undo" class="btn-ghost btn-sm rounded px-2 py-1" title="Annuler">↶</button>
            <button type="button" data-richtext-command="redo" class="btn-ghost btn-sm rounded px-2 py-1" title="Rétablir">↷</button>
        </div>

        <div
            data-richtext-editable
            contenteditable="true"
            role="textbox"
            aria-multiline="true"
            aria-labelledby="<?php echo e($fieldId); ?>-label"
            class="min-h-[10rem] bg-brand-white px-3 py-2.5 text-sm text-brand-ink focus:outline-none"
        ><?php echo $value; ?></div>

        <textarea name="<?php echo e($name); ?>" id="<?php echo e($fieldId); ?>" class="sr-only" aria-hidden="true" tabindex="-1"><?php echo e($value); ?></textarea>
    </div>

    <?php if($help): ?>
        <p class="text-xs text-brand-muted"><?php echo e($help); ?></p>
    <?php endif; ?>
</div>
<?php /**PATH C:\wamp64\www\nh-trans\resources\views/components/admin/richtext.blade.php ENDPATH**/ ?>