@extends('layouts.adminlte')
@section('title', 'Nuova Mailing List')
@section('page_title', 'Nuova Mailing List')

@section('content')
<div class="card">
    <div class="card-header">
        <h3 class="card-title"><i class="fas fa-plus mr-2"></i>Crea Mailing List</h3>
    </div>
    <div class="card-body">
        <form action="{{ route('mailing-liste.store') }}" method="POST">
            @csrf
            <div class="row">
                <div class="col-md-6">
                    <div class="form-group">
                        <label>Nome *</label>
                        <input type="text" name="nome" class="form-control" required>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <div class="custom-control custom-checkbox mt-4">
                            <input type="checkbox" class="custom-control-input" id="attiva" name="attiva" value="1" checked>
                            <label class="custom-control-label" for="attiva">Lista attiva</label>
                        </div>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label>Descrizione</label>
                <textarea name="descrizione" class="form-control" rows="2"></textarea>
            </div>
            <div class="alert alert-info">
                <i class="fas fa-info-circle mr-1"></i>
                <strong>Come aggiungere contatti:</strong> vai su <em>Individui</em>, seleziona le righe desired, e usa il menu <em>Azioni &gt; Crea Mailing List</em> per creare una lista dai contatti selezionati.
            </div>
            <button type="submit" class="btn btn-success">
                <i class="fas fa-save mr-1"></i> Salva Lista
            </button>
            <a href="{{ route('mailing-liste.index') }}" class="btn btn-secondary">Annulla</a>
        </form>
    </div>
</div>
@endsection