<?php
    /** @var \App\Models\Content $content */
?>

<label for="type">Type</label>
<select id="type" name="type" required>
    <?php $__currentLoopData = $types; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $label): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <option value="<?php echo e($key); ?>" <?php if(old('type', $content->type) === $key): echo 'selected'; endif; ?>><?php echo e($label); ?></option>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>

<label for="title">Titre</label>
<input id="title" type="text" name="title" value="<?php echo e(old('title', $content->title)); ?>" required maxlength="255">

<label for="slug">Slug (URL, optionnel)</label>
<input id="slug" type="text" name="slug" value="<?php echo e(old('slug', $content->slug)); ?>" maxlength="255" placeholder="genere-automatiquement-si-vide">

<label for="tag">Tag / theme (ex. Sourcing)</label>
<input id="tag" type="text" name="tag" value="<?php echo e(old('tag', $content->tag)); ?>" maxlength="120">

<label for="excerpt">Chapo / extrait</label>
<textarea id="excerpt" name="excerpt" rows="3"><?php echo e(old('excerpt', $content->excerpt)); ?></textarea>

<label for="body">Corps (HTML simple ou texte)</label>
<textarea id="body" name="body" rows="10"><?php echo e(old('body', $content->body)); ?></textarea>

<label for="cta_label">Libelle du lien d'action</label>
<input id="cta_label" type="text" name="cta_label" value="<?php echo e(old('cta_label', $content->cta_label)); ?>" maxlength="120" placeholder="Ex. Demander l'accompagnement">

<label for="cta_url">URL du lien d'action</label>
<input id="cta_url" type="text" name="cta_url" value="<?php echo e(old('cta_url', $content->cta_url)); ?>" maxlength="2048" placeholder="/contact ou URL externe">

<label for="meta_title">Meta title (SEO)</label>
<input id="meta_title" type="text" name="meta_title" value="<?php echo e(old('meta_title', $content->meta_title)); ?>" maxlength="255">

<label for="meta_description">Meta description (SEO)</label>
<input id="meta_description" type="text" name="meta_description" value="<?php echo e(old('meta_description', $content->meta_description)); ?>" maxlength="512">

<label for="sort_order">Ordre d'affichage (0 = premier)</label>
<input id="sort_order" type="number" name="sort_order" value="<?php echo e(old('sort_order', $content->sort_order ?? 0)); ?>" min="0" max="9999">

<label for="published_at">Date de publication</label>
<input id="published_at" type="datetime-local" name="published_at" value="<?php echo e(old('published_at', $content->published_at ? $content->published_at->format('Y-m-d\TH:i') : '')); ?>">

<label class="row-check">
    <input type="hidden" name="is_published" value="0">
    <input type="checkbox" name="is_published" value="1" <?php if(old('is_published', $content->is_published ? '1' : '0') === '1'): echo 'checked'; endif; ?>>
    Publie sur le site
</label>
<?php /**PATH C:\Softsys\new_pirras\resources\views/admin/contents/_form.blade.php ENDPATH**/ ?>